]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CI: travis-ci: split asan step out of running tests
authorIlya Shipitsin <chipitsine@gmail.com>
Thu, 27 Aug 2020 16:00:09 +0000 (21:00 +0500)
committerWilly Tarreau <w@1wt.eu>
Tue, 15 Sep 2020 07:02:07 +0000 (09:02 +0200)
when asan (address sanitizer) is enabled, it's findings were mixed
with test debug output and it was hard to identify whether tests
failed or asan failed.

let us output asan log to separate file and report its findings
separately

.travis.yml

index 8850850ecb4dca32cdcec9f41a21695f2df816a6..a8aaccba531468de7f877926cdd59e32afdf93ff 100644 (file)
@@ -131,13 +131,18 @@ install:
     fi
 
 script:
-  - if [ "${CC%-*}"  = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address"; fi
+  - if [ "${CC%-*}"  = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ASAN_OPTIONS="log_path=asan.log"; fi
   - make -C contrib/wurfl
   - make -j3 CC=$CC CPU_CFLAGS.generic="-O1" V=1 ERR=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" ADDLIB="$ADDLIB" SSL_LIB="$SSL_LIB" SSL_INC="$SSL_INC" SLZ_LIB="$SLZ_LIB" SLZ_INC="$SLZ_INC" 51DEGREES_SRC="$FIFTYONEDEGREES_SRC" EXTRA_OBJS="$EXTRA_OBJS" $DEBUG_OPTIONS
   - ./haproxy -vv
   - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
   - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
   - make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
+  - |
+    if ls asan.log* 1>/dev/null 2>&1; then
+       cat asan.log*
+       exit 1
+    fi
 
 after_failure:
   - |