diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64d3f60653..a24f37a6d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -199,18 +199,16 @@ jobs: working-directory: tests run: | # Explicitly use bash because /bin/sh doesn't have pipefail option - /bin/bash -o pipefail -c './test 2>&1 | tee test.out' - rc=$? + /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=$? + ./test || rc=$? fi fi - if [ "$rc" != 0 ]; then + if [ -n "$rc" ]; then echo '*** Tests failed, contents of httpbin.log follows: ***' echo '-----------------------------------------------------------' cat httpbin.log