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-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" "${BASE_BUILD_DIR}/bitcoin-*/src/test/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
|
|
|
|
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
|