bitcoin/ci/test/06_script_b.sh

90 lines
3.4 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
#
# Copyright (c) 2018-2022 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
2020-11-09 06:17:00 -03:00
if [[ $HOST = *-mingw32 ]]; then
# Generate all binaries, so that they can be wrapped
CI_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
2020-11-09 06:17:00 -03:00
fi
2019-10-02 18:10:57 -03:00
if [ -n "$QEMU_USER_CMD" ]; then
# Generate all binaries, so that they can be wrapped
CI_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh"
2019-10-02 18:10:57 -03:00
fi
2019-11-15 13:38:27 -03:00
if [ -n "$USE_VALGRIND" ]; then
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh"
2019-11-15 13:38:27 -03:00
fi
if [ "$RUN_UNIT_TESTS" = "true" ]; then
CI_EXEC "${TEST_RUNNER_ENV}" DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" make "$MAKEJOBS" check VERBOSE=1
fi
2020-04-08 10:20:52 -04:00
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
2022-03-29 11:08:49 -03:00
CI_EXEC "${TEST_RUNNER_ENV}" DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}/bin/test_bitcoin" --catch_system_errors=no -l test_suite
2020-04-08 10:20:52 -04:00
fi
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
CI_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${TEST_RUNNER_ENV}" test/functional/test_runner.py --ci "$MAKEJOBS" --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" --ansi --combinedlogslen=4000 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" "${TEST_RUNNER_EXTRA}" --quiet --failfast
fi
2019-01-16 13:49:01 -03:00
2022-04-04 05:00:09 -04:00
if [ "${RUN_TIDY}" = "true" ]; then
2022-07-26 11:24:28 -04:00
set -eo pipefail
2022-04-04 05:00:09 -04:00
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
2022-07-26 11:24:28 -04:00
( CI_EXEC run-clang-tidy -quiet "${MAKEJOBS}" ) | grep -C5 "error"
2022-04-11 15:45:22 -04:00
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/"
2022-04-29 09:07:11 -04:00
CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/iwyu_tool.py"\
" src/common/url.cpp"\
" src/compat"\
" src/dbwrapper.cpp"\
" src/init"\
" src/kernel"\
" src/node/chainstate.cpp"\
2022-09-10 08:09:48 -04:00
" src/node/chainstatemanager_args.cpp"\
2022-08-02 09:21:47 -04:00
" src/node/mempool_args.cpp"\
" src/node/validation_cache_args.cpp"\
" src/policy/feerate.cpp"\
" src/policy/packages.cpp"\
" src/policy/settings.cpp"\
" src/primitives/transaction.cpp"\
" src/rpc/fees.cpp"\
" src/rpc/signmessage.cpp"\
" src/test/fuzz/txorphan.cpp"\
2022-11-23 12:36:58 -03:00
" src/test/fuzz/util/"\
" src/util/bip32.cpp"\
" src/util/bytevectorhash.cpp"\
" src/util/check.cpp"\
" src/util/error.cpp"\
" src/util/getuniquepath.cpp"\
" src/util/hasher.cpp"\
" src/util/message.cpp"\
" src/util/moneystr.cpp"\
" src/util/serfloat.cpp"\
" src/util/spanparsing.cpp"\
" src/util/strencodings.cpp"\
2022-08-19 06:19:18 -04:00
" src/util/string.cpp"\
" src/util/syserror.cpp"\
2022-10-11 04:33:22 -03:00
" src/util/threadinterrupt.cpp"\
2022-09-15 08:08:45 -03:00
" src/zmq"\
" -p . ${MAKEJOBS} -- -Xiwyu --cxx17ns -Xiwyu --mapping_file=${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp"
2022-04-04 05:00:09 -04:00
fi
if [ "$RUN_SECURITY_TESTS" = "true" ]; then
CI_EXEC make test-security-check
fi
2019-01-16 13:49:01 -03:00
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
CI_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py "${FUZZ_TESTS_CONFIG}" "$MAKEJOBS" -l DEBUG "${DIR_FUZZ_IN}"
2019-01-16 13:49:01 -03:00
fi
2023-01-09 06:42:19 -03:00
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
echo "Stop and remove CI container by ID"
docker container kill "${CI_CONTAINER_ID}"
fi