Travis CI: Run 'make check-without-test-driver' for build with MSan/UBsan
authorIvan Maidanski <ivmai@mail.ru>
Sat, 18 Feb 2017 14:46:17 +0000 (17:46 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 18 Feb 2017 14:46:17 +0000 (17:46 +0300)
(fix commit 8277cbf)

.travis.yml

index d213e49..4252237 100644 (file)
@@ -67,10 +67,6 @@ before_install:
   - if [[ "$SANITIZE" != "" ]]; then
       CFLAGS_EXTRA="$CFLAGS_EXTRA -fsanitize=$SANITIZE -fno-common -fno-omit-frame-pointer";
     fi
-# TODO: Issues found by MSan and UBSan do not cause the build to fail by now.
-# Travis Linux/clang-3.4 does not accept -fno-sanitize-recover=undefined,
-# and the sanitizer runtime does not seem to handle MSAN_OPTIONS="exitcode=1"
-# and UBSAN_OPTIONS="halt_on_error=1".
 
 install:
   - ./autogen.sh
@@ -96,6 +92,9 @@ script:
       cppcheck/cppcheck -f -q --error-exitcode=2 -Ulong -DAO_TEST_EMULATION
                 -DCPPCHECK -I src --enable=unusedFunction tests/*.c src/*.c;
     fi
+  - if [[ "$SANITIZE" == *memory* || "$SANITIZE" == *undefined* ]]; then
+      UBSAN_OPTIONS="halt_on_error=1" make -C tests check-without-test-driver;
+    fi
 
 after_success:
   - if [[ "$CONF_GCOV" == --en* ]]; then