Rerun the test if LeakSanitizer crashed while running it
This crash (see https://github.com/google/sanitizers/issues/1353) happens sporadically but regularly enough to be annoying, so try to work around it by rerunning the test and hope that it doesn't happen twice in a row.
This commit is contained in:
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@@ -182,8 +182,19 @@ jobs:
|
||||
if: matrix.skip_testing != true
|
||||
working-directory: tests
|
||||
run: |
|
||||
./test || rc=$?
|
||||
if [ -n "$rc" ]; then
|
||||
# Explicitly use bash because /bin/sh doesn't have pipefail option
|
||||
/bin/bash -o pipefail -c './test 2>&1 | tee test.out'
|
||||
rc=$?
|
||||
if [ ${{ matrix.use_asan }} ]; then
|
||||
# Work around spurious crashes by running the test again.
|
||||
# See https://github.com/google/sanitizers/issues/1353
|
||||
if fgrep -q 'LeakSanitizer has encountered a fatal error' test.out; then
|
||||
echo '+++ Rerunning the tests once again after LeakSanitizer crash +++'
|
||||
./test
|
||||
rc=$?
|
||||
fi
|
||||
fi
|
||||
if [ "$rc" != 0 ]; then
|
||||
echo '*** Tests failed, contents of httpbin.log follows: ***'
|
||||
echo '-----------------------------------------------------------'
|
||||
cat httpbin.log
|
||||
|
Reference in New Issue
Block a user