Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-configurations.sh
Show All 34 Lines | setup() { | ||||
mkdir -p "${SAN_LOG_DIR}" | mkdir -p "${SAN_LOG_DIR}" | ||||
rm -rf "${SAN_LOG_DIR:?}"/* | rm -rf "${SAN_LOG_DIR:?}"/* | ||||
# Sanitizers options, not used if sanitizers are not enabled | # Sanitizers options, not used if sanitizers are not enabled | ||||
export ASAN_OPTIONS="malloc_context_size=0:log_path=${SAN_LOG_DIR}/asan.log" | export ASAN_OPTIONS="malloc_context_size=0:log_path=${SAN_LOG_DIR}/asan.log" | ||||
export LSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/lsan:log_path=${SAN_LOG_DIR}/lsan.log" | export LSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/lsan:log_path=${SAN_LOG_DIR}/lsan.log" | ||||
export TSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/tsan:log_path=${SAN_LOG_DIR}/tsan.log" | export TSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/tsan:log_path=${SAN_LOG_DIR}/tsan.log" | ||||
export UBSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/ubsan:print_stacktrace=1:halt_on_error=1:log_path=${SAN_LOG_DIR}/ubsan.log" | export UBSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/ubsan:print_stacktrace=1:halt_on_error=1:log_path=${SAN_LOG_DIR}/ubsan.log" | ||||
# Unit test logger parameters | |||||
UNIT_TESTS_JUNIT_LOG_LEVEL=message | |||||
} | |||||
run_test_bitcoin() { | |||||
# Usage: run_test_bitcoin "Context as string" [arguments...] | |||||
ninja test_bitcoin | |||||
TEST_BITCOIN_JUNIT="junit_results_unit_tests${1:+_${1// /_}}.xml" | |||||
TEST_BITCOIN_SUITE_NAME="Bitcoin ABC unit tests${1:+ $1}" | |||||
./src/test/test_bitcoin \ | |||||
--logger=HRF:JUNIT,${UNIT_TESTS_JUNIT_LOG_LEVEL},${TEST_BITCOIN_JUNIT} \ | |||||
-- \ | |||||
-testsuitename="${TEST_BITCOIN_SUITE_NAME}" \ | |||||
"${@:2}" | |||||
} | } | ||||
# Facility to print out sanitizer log outputs to the build log console | # Facility to print out sanitizer log outputs to the build log console | ||||
print_sanitizers_log() { | print_sanitizers_log() { | ||||
for log in "${SAN_LOG_DIR}"/*.log.* | for log in "${SAN_LOG_DIR}"/*.log.* | ||||
do | do | ||||
echo "*** Output of ${log} ***" | echo "*** Output of ${log} ***" | ||||
cat "${log}" | cat "${log}" | ||||
Show All 15 Lines | CMAKE_FLAGS=( | ||||
# Disabling the assembly works around the issue. | # Disabling the assembly works around the issue. | ||||
"-DCRYPTO_USE_ASM=OFF" | "-DCRYPTO_USE_ASM=OFF" | ||||
"-DENABLE_SANITIZERS=address" | "-DENABLE_SANITIZERS=address" | ||||
"-DCCACHE=OFF" | "-DCCACHE=OFF" | ||||
"-DCMAKE_C_COMPILER=clang" | "-DCMAKE_C_COMPILER=clang" | ||||
"-DCMAKE_CXX_COMPILER=clang++" | "-DCMAKE_CXX_COMPILER=clang++" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | ||||
ninja check check-functional | |||||
run_test_bitcoin "with address sanitizer" | |||||
# Libs and utils tests | |||||
ninja \ | |||||
check-bitcoin-qt \ | |||||
check-bitcoin-seeder \ | |||||
check-bitcoin-util \ | |||||
ninja check-functional | |||||
;; | ;; | ||||
build-ubsan) | build-ubsan) | ||||
# Build with the undefined sanitizer, then run unit tests and functional tests. | # Build with the undefined sanitizer, then run unit tests and functional tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_BUILD_TYPE=Debug" | "-DCMAKE_BUILD_TYPE=Debug" | ||||
"-DENABLE_SANITIZERS=undefined" | "-DENABLE_SANITIZERS=undefined" | ||||
"-DCCACHE=OFF" | "-DCCACHE=OFF" | ||||
"-DCMAKE_C_COMPILER=clang" | "-DCMAKE_C_COMPILER=clang" | ||||
"-DCMAKE_CXX_COMPILER=clang++" | "-DCMAKE_CXX_COMPILER=clang++" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | ||||
ninja check check-functional | |||||
run_test_bitcoin "with undefined sanitizer" | |||||
# Libs and utils tests | |||||
ninja \ | |||||
check-bitcoin-qt \ | |||||
check-bitcoin-seeder \ | |||||
check-bitcoin-util \ | |||||
ninja check-functional | |||||
;; | ;; | ||||
build-tsan) | build-tsan) | ||||
# Build with the thread sanitizer, then run unit tests and functional tests. | # Build with the thread sanitizer, then run unit tests and functional tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DCMAKE_BUILD_TYPE=Debug" | "-DCMAKE_BUILD_TYPE=Debug" | ||||
"-DENABLE_SANITIZERS=thread" | "-DENABLE_SANITIZERS=thread" | ||||
"-DCCACHE=OFF" | "-DCCACHE=OFF" | ||||
"-DCMAKE_C_COMPILER=clang" | "-DCMAKE_C_COMPILER=clang" | ||||
"-DCMAKE_CXX_COMPILER=clang++" | "-DCMAKE_CXX_COMPILER=clang++" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | ||||
run_test_bitcoin "with thread sanitizer" | |||||
# Libs and utils tests | |||||
ninja \ | |||||
check-bitcoin-qt \ | |||||
check-bitcoin-seeder \ | |||||
check-bitcoin-util \ | |||||
ninja check check-functional | ninja check check-functional | ||||
;; | ;; | ||||
build-diff) | build-diff) | ||||
# Build, run unit tests and functional tests. | # Build, run unit tests and functional tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DSECP256K1_ENABLE_MODULE_ECDH=ON" | "-DSECP256K1_ENABLE_MODULE_ECDH=ON" | ||||
"-DSECP256K1_ENABLE_JNI=ON" | "-DSECP256K1_ENABLE_JNI=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | ||||
# FIXME: Path collisions in src/test/util_tests.cpp cause issues when | |||||
# upgraded tests are run in parallel with their non-upgraded counterpart. | # Unit tests | ||||
# Change this back to a one-liner when the root cause is fixed. | run_test_bitcoin | ||||
ninja check-all | run_test_bitcoin "with next upgrade activated" -phononactivationtime=1575158400 | ||||
ninja check-upgrade-activated | |||||
# Libs and tools tests | |||||
ninja \ | |||||
check-bitcoin-qt \ | |||||
check-bitcoin-seeder \ | |||||
check-bitcoin-util \ | |||||
check-devtools \ | |||||
check-leveldb \ | |||||
check-rpcauth \ | |||||
check-secp256k1 \ | |||||
check-univalue \ | |||||
# Functional tests | |||||
ninja check-functional | |||||
ninja check-functional-upgrade-activated | |||||
;; | ;; | ||||
build-master) | build-master) | ||||
# Build, run unit tests and extended functional tests. | # Build, run unit tests and extended functional tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DSECP256K1_ENABLE_MODULE_ECDH=ON" | "-DSECP256K1_ENABLE_MODULE_ECDH=ON" | ||||
"-DSECP256K1_ENABLE_JNI=ON" | "-DSECP256K1_ENABLE_JNI=ON" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | ||||
# FIXME: Path collisions in src/test/util_tests.cpp cause issues when | |||||
# upgraded tests are run in parallel with their non-upgraded counterpart. | # Unit tests | ||||
# Change this back to a one-liner when the root cause is fixed. | run_test_bitcoin | ||||
ninja check-extended | run_test_bitcoin "with next upgrade activated" -phononactivationtime=1575158400 | ||||
ninja check-upgrade-activated-extended | |||||
# Libs and tools tests | |||||
ninja \ | |||||
check-bitcoin-qt \ | |||||
check-bitcoin-seeder \ | |||||
check-bitcoin-util \ | |||||
check-devtools \ | |||||
check-leveldb \ | |||||
check-rpcauth \ | |||||
check-secp256k1 \ | |||||
check-univalue \ | |||||
# Functional tests | |||||
ninja check-functional-extended | |||||
ninja check-functional-upgrade-activated-extended | |||||
;; | ;; | ||||
build-without-wallet) | build-without-wallet) | ||||
# Build without wallet and run the unit tests. | # Build without wallet and run the unit tests. | ||||
CMAKE_FLAGS=( | CMAKE_FLAGS=( | ||||
"-DBUILD_BITCOIN_WALLET=OFF" | "-DBUILD_BITCOIN_WALLET=OFF" | ||||
) | ) | ||||
CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | CMAKE_FLAGS="${CMAKE_FLAGS[*]}" "${CI_SCRIPTS_DIR}"/build_cmake.sh | ||||
ninja check | |||||
ninja check-bitcoin-qt | |||||
run_test_bitcoin "without wallet" | |||||
;; | ;; | ||||
build-ibd) | build-ibd) | ||||
"${CI_SCRIPTS_DIR}"/build_cmake.sh | "${CI_SCRIPTS_DIR}"/build_cmake.sh | ||||
"${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -debug=net | "${CI_SCRIPTS_DIR}"/ibd.sh -disablewallet -debug=net | ||||
;; | ;; | ||||
build-ibd-no-assumevalid-checkpoint) | build-ibd-no-assumevalid-checkpoint) | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |