diff --git a/contrib/devtools/build_cmake.sh b/contrib/devtools/build_cmake.sh --- a/contrib/devtools/build_cmake.sh +++ b/contrib/devtools/build_cmake.sh @@ -27,7 +27,7 @@ mkdir -p "${BUILD_DIR}" cd ${BUILD_DIR} -git clean -xffd +git clean -xffd || true read -a CMAKE_FLAGS <<< "${CMAKE_FLAGS}" diff --git a/contrib/teamcity/build-configurations.json b/contrib/teamcity/build-configurations.json --- a/contrib/teamcity/build-configurations.json +++ b/contrib/teamcity/build-configurations.json @@ -23,8 +23,9 @@ "script": "builds/build-asan.sh", "template": "common_unix_artifacts", "timeout": 1800, - "artifacts": { - "sanitizer_logs": "log" + "env": { + "ASAN_OPTIONS": "log_path=stdout", + "LSAN_OPTIONS": "log_path=stdout" } }, "build-autotools": { @@ -138,16 +139,16 @@ "script": "builds/build-tsan.sh", "template": "common_unix_artifacts", "timeout": 1800, - "artifacts": { - "sanitizer_logs": "log" + "env": { + "TSAN_OPTIONS": "log_path=stdout" } }, "build-ubsan": { "script": "builds/build-ubsan.sh", "template": "common_unix_artifacts", "timeout": 1800, - "artifacts": { - "sanitizer_logs": "log" + "env": { + "UBSAN_OPTIONS": "log_path=stdout" } }, "build-win64": { diff --git a/contrib/teamcity/ci-fixture.sh b/contrib/teamcity/ci-fixture.sh --- a/contrib/teamcity/ci-fixture.sh +++ b/contrib/teamcity/ci-fixture.sh @@ -17,12 +17,6 @@ mkdir -p "${SAN_LOG_DIR}" rm -rf "${SAN_LOG_DIR:?}"/* -# Needed options are set by the build system, add the log path to all runs -export ASAN_OPTIONS="log_path=${SAN_LOG_DIR}/asan.log" -export LSAN_OPTIONS="log_path=${SAN_LOG_DIR}/lsan.log" -export TSAN_OPTIONS="log_path=${SAN_LOG_DIR}/tsan.log" -export UBSAN_OPTIONS="log_path=${SAN_LOG_DIR}/ubsan.log" - run_test_bitcoin() { # Usage: run_test_bitcoin "Context as string" [arguments...] ninja test_bitcoin @@ -31,10 +25,10 @@ TEST_BITCOIN_SUITE_NAME="Bitcoin ABC unit tests${1:+ $1}" # More sanitizer options are needed to run the executable directly - ASAN_OPTIONS="malloc_context_size=0:${ASAN_OPTIONS}" \ - LSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/lsan:${LSAN_OPTIONS}" \ - TSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/tsan:${TSAN_OPTIONS}" \ - UBSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/ubsan:print_stacktrace=1:halt_on_error=1:${UBSAN_OPTIONS}" \ + ASAN_OPTIONS="malloc_context_size=0:${ASAN_OPTIONS:-}" \ + LSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/lsan:${LSAN_OPTIONS:-}" \ + TSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/tsan:${TSAN_OPTIONS:-}" \ + UBSAN_OPTIONS="suppressions=${SAN_SUPP_DIR}/ubsan:print_stacktrace=1:halt_on_error=1:${UBSAN_OPTIONS:-}" \ ./src/test/test_bitcoin \ --logger=HRF:JUNIT,message,${TEST_BITCOIN_JUNIT} \ -- \ @@ -42,18 +36,6 @@ "${@:2}" } -# Facility to print out sanitizer log outputs to the build log console -print_sanitizers_log() { - for log in "${SAN_LOG_DIR}"/*.log.* - do - if [ -f "${log}" ]; then - echo "*** Output of ${log} ***" - cat "${log}" - fi - done -} -trap "print_sanitizers_log" ERR - # It is valid to call the function with no argument, so ignore SC2120 # shellcheck disable=SC2120 build_with_cmake() {