From ec965d7d0b9a7b4bc10857aa8b46f457671c87c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sat, 13 May 2023 17:44:02 +0200 Subject: [PATCH] Show ASan/UBSan logs in CI also for unit and integration tests The ASan/UBSan logs are currently only printed in the CI log when launching the client and server once. Now the logs are also printed when the unit or integration tests fail due to a sanitizer crash. A redundant definition of an environment variable is removed. --- .github/workflows/clang-sanitizer.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/clang-sanitizer.yml b/.github/workflows/clang-sanitizer.yml index 840afbc40..e08622524 100644 --- a/.github/workflows/clang-sanitizer.yml +++ b/.github/workflows/clang-sanitizer.yml @@ -43,9 +43,18 @@ jobs: fi - name: Run unit tests with ASan and UBSan run: | - export UBSAN_OPTIONS=suppressions=./ubsan.supp:log_path=./SAN:print_stacktrace=1:halt_on_errors=0 cmake --build . --config Debug --target run_cxx_tests # Rust tests work locally, but still not in CI, even with the same directory + if test -n "$(find . -maxdepth 1 -name 'SAN.*' -print -quit)" + then + cat ./SAN.* + exit 1 + fi - name: Run integration tests with ASan and UBSan run: | make run_integration_tests + if test -n "$(find . -maxdepth 1 -name 'SAN.*' -print -quit)" + then + cat ./SAN.* + exit 1 + fi