diff options
author | Jack Lloyd <[email protected]> | 2017-08-25 12:09:18 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-25 18:35:29 -0400 |
commit | 58b7e245fef34f917fc64378bceb1fdc632dbba5 (patch) | |
tree | d64f71c8649cf90273e874407334e42894708017 /src/scripts | |
parent | c618a1beb5cf7fe5582c467b35adc5e0e679b941 (diff) |
Run fuzzers under coverage tests as well
Diffstat (limited to 'src/scripts')
-rwxr-xr-x | src/scripts/ci/travis/build.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/scripts/ci/travis/build.sh b/src/scripts/ci/travis/build.sh index d2e35112e..bbf4e986c 100755 --- a/src/scripts/ci/travis/build.sh +++ b/src/scripts/ci/travis/build.sh @@ -34,7 +34,7 @@ elif [ "$BUILD_MODE" = "parallel" ]; then fi elif [ "$BUILD_MODE" = "coverage" ]; then - CFG_FLAGS+=(--with-coverage --no-optimizations) + CFG_FLAGS+=(--with-coverage --build-fuzzers=test --no-optimizations) elif [ "$BUILD_MODE" = "sanitizer" ]; then export ASAN_OPTIONS=detect_leaks=0 CFG_FLAGS+=(--with-sanitizers --disable-modules=locking_allocator) @@ -139,7 +139,7 @@ else time "${MAKE_CMD[@]}" fi -if [ "$BUILD_MODE" = "fuzzers" ]; then +if [ "$BUILD_MODE" = "fuzzers" ] || [ "$BUILD_MODE" = "coverage" ]; then make fuzzers make fuzzer_corpus_zip fi @@ -182,15 +182,17 @@ if [ "$BUILD_MODE" = "sonarqube" ] || [ "$BUILD_MODE" = "docs" ] || ( [ "${BUILD_MODE:0:5}" = "cross" ] && [ "$TRAVIS_OS_NAME" = "osx" ] ); then echo "Running tests disabled on this build type" -elif [ "$BUILD_MODE" = "fuzzers" ]; then - # Test each fuzzer against its corpus - ./src/scripts/test_fuzzers.py fuzzer_corpus build/fuzzer -else +elif [ "$BUILD_MODE" != "fuzzers" ]; then TEST_CMD=("${TEST_PREFIX[@]}" $TEST_EXE "${TEST_FLAGS[@]}") echo "Running" "${TEST_CMD[@]}" time "${TEST_CMD[@]}" fi +if [ "$BUILD_MODE" = "fuzzers" ] || [ "$BUILD_MODE" = "coverage" ]; then + # Test each fuzzer against its corpus + LD_LIBRARY_PATH=. ./src/scripts/test_fuzzers.py fuzzer_corpus build/fuzzer +fi + if [ "$BUILD_MODE" = "static" ] || [ "$BUILD_MODE" = "shared" ] then echo "Running cli tests ..." |