diff --git a/.travis.yml b/.travis.yml index 4037ffac7f..a2ed8639d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -257,6 +257,12 @@ after_success: name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]' env: >- FILE_ENV="./ci/test/00_setup_env_native_fuzz.sh" + + - stage: test + name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, fuzzers under valgrind]' + env: >- + FILE_ENV="./ci/test/00_setup_env_native_fuzz_with_valgrind.sh" + - stage: test env: >- FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh" diff --git a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh new file mode 100644 index 0000000000..6e1c400d50 --- /dev/null +++ b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2019 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +export CONTAINER_NAME=ci_native_fuzz_valgrind +export PACKAGES="clang-8 llvm-8 python3 libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev valgrind" +export NO_DEPENDS=1 +export RUN_UNIT_TESTS=false +export RUN_FUNCTIONAL_TESTS=false +export RUN_FUZZ_TESTS=true +export FUZZ_TESTS_CONFIG="--exclude integer,parse_iso8601 --valgrind" +export GOAL="install" +export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang-8 CXX=clang++-8" +# Use clang-8, instead of default clang on bionic, which is clang-6 and does not come with libfuzzer on aarch64 diff --git a/test/fuzz/test_runner.py b/test/fuzz/test_runner.py index ea75cecc95..d9696f20c8 100755 --- a/test/fuzz/test_runner.py +++ b/test/fuzz/test_runner.py @@ -267,6 +267,13 @@ def run_once(*, fuzz_pool, corpus, test_list, build_dir, use_valgrind): logging.debug(output) try: result.check_returncode() + except subprocess.CalledProcessError as e: + if e.stdout: + logging.info(e.stdout) + if e.stderr: + logging.info(e.stderr) + logging.info("Target \"{}\" failed with exit code {}: {}".format(t, e.returncode, " ".join(args))) + sys.exit(1) except subprocess.CalledProcessError as e: if e.stdout: logging.info(e.stdout)