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.
This commit is contained in:
Robert Müller 2023-05-13 17:44:02 +02:00
parent d873095d33
commit ec965d7d0b

View file

@ -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