2019-01-31 18:28:02 -03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
2021-12-30 14:36:57 -03:00
|
|
|
# Copyright (c) 2018-2021 The Bitcoin Core developers
|
2019-01-31 18:28:02 -03:00
|
|
|
# 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
|
2022-01-31 08:09:37 -03:00
|
|
|
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
|
2022-01-31 08:09:37 -03:00
|
|
|
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
|
2022-01-31 08:09:37 -03:00
|
|
|
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh"
|
2019-11-15 13:38:27 -03:00
|
|
|
fi
|
|
|
|
|
2019-01-31 18:28:02 -03:00
|
|
|
if [ "$RUN_UNIT_TESTS" = "true" ]; then
|
2022-01-31 08:09:37 -03:00
|
|
|
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
|
2019-01-31 18:28:02 -03:00
|
|
|
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
|
|
|
|
|
2019-01-31 18:28:02 -03:00
|
|
|
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
|
2022-01-31 08:09:37 -03:00
|
|
|
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
|
2019-01-31 18:28:02 -03:00
|
|
|
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"\
|
2022-04-28 04:30:40 -04:00
|
|
|
" src/compat"\
|
2022-07-19 08:28:00 -04:00
|
|
|
" src/dbwrapper.cpp"\
|
2022-04-28 04:30:40 -04:00
|
|
|
" src/init"\
|
2022-06-08 12:28:41 -04:00
|
|
|
" src/kernel"\
|
2022-07-19 08:05:01 -04:00
|
|
|
" src/node/chainstate.cpp"\
|
2022-08-02 09:21:47 -04:00
|
|
|
" src/node/mempool_args.cpp"\
|
2022-06-30 23:47:41 -04:00
|
|
|
" src/node/validation_cache_args.cpp"\
|
2022-05-31 07:30:23 -04:00
|
|
|
" src/policy/feerate.cpp"\
|
|
|
|
" src/policy/packages.cpp"\
|
|
|
|
" src/policy/settings.cpp"\
|
2022-07-25 06:13:56 -04:00
|
|
|
" src/primitives/transaction.cpp"\
|
2022-04-29 09:37:25 -04:00
|
|
|
" src/rpc/fees.cpp"\
|
2022-04-28 04:30:40 -04:00
|
|
|
" src/rpc/signmessage.cpp"\
|
2022-06-22 08:44:43 -04:00
|
|
|
" src/test/fuzz/txorphan.cpp"\
|
2022-04-30 04:24:24 -04:00
|
|
|
" src/threadinterrupt.cpp"\
|
2022-06-09 11:26:55 -04:00
|
|
|
" src/util/bip32.cpp"\
|
|
|
|
" src/util/bytevectorhash.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"\
|
2022-06-09 11:26:55 -04:00
|
|
|
" src/util/syserror.cpp"\
|
|
|
|
" src/util/url.cpp"\
|
2022-04-28 04:30:40 -04:00
|
|
|
" -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
|
|
|
|
|
2020-03-26 00:38:24 -03:00
|
|
|
if [ "$RUN_SECURITY_TESTS" = "true" ]; then
|
2022-01-31 08:09:37 -03:00
|
|
|
CI_EXEC make test-security-check
|
2020-03-26 00:38:24 -03:00
|
|
|
fi
|
|
|
|
|
2019-01-16 13:49:01 -03:00
|
|
|
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
2022-01-31 08:09:37 -03:00
|
|
|
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
|