2019-01-31 22:28:02 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
2020-04-16 19:14:08 +02:00
|
|
|
# Copyright (c) 2018-2020 The Bitcoin Core developers
|
2019-01-31 22:28:02 +01: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
|
|
|
|
|
2019-10-02 23:10:57 +02:00
|
|
|
if [ -n "$QEMU_USER_CMD" ]; then
|
|
|
|
BEGIN_FOLD wrap-qemu
|
|
|
|
# Generate all binaries, so that they can be wrapped
|
|
|
|
DOCKER_EXEC make $MAKEJOBS -C src/secp256k1 VERBOSE=1
|
|
|
|
DOCKER_EXEC make $MAKEJOBS -C src/univalue VERBOSE=1
|
2019-12-17 19:33:58 +01:00
|
|
|
DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh"
|
2019-10-02 23:10:57 +02:00
|
|
|
END_FOLD
|
|
|
|
fi
|
|
|
|
|
2019-11-15 17:38:27 +01:00
|
|
|
if [ -n "$USE_VALGRIND" ]; then
|
|
|
|
BEGIN_FOLD wrap-valgrind
|
|
|
|
DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh"
|
|
|
|
END_FOLD
|
|
|
|
fi
|
|
|
|
|
2019-01-31 22:28:02 +01:00
|
|
|
if [ "$RUN_UNIT_TESTS" = "true" ]; then
|
|
|
|
BEGIN_FOLD unit-tests
|
2019-11-21 01:40:22 +01:00
|
|
|
DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib make $MAKEJOBS check VERBOSE=1
|
2019-01-31 22:28:02 +01:00
|
|
|
END_FOLD
|
|
|
|
fi
|
|
|
|
|
2020-04-08 16:20:52 +02:00
|
|
|
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
|
|
|
|
BEGIN_FOLD unit-tests-seq
|
2020-04-22 16:24:29 +02:00
|
|
|
DOCKER_EXEC 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 16:20:52 +02:00
|
|
|
END_FOLD
|
|
|
|
fi
|
|
|
|
|
2019-01-31 22:28:02 +01:00
|
|
|
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
|
|
|
|
BEGIN_FOLD functional-tests
|
2020-08-15 09:36:13 +02:00
|
|
|
DOCKER_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 22:28:02 +01:00
|
|
|
END_FOLD
|
|
|
|
fi
|
2019-01-16 17:49:01 +01:00
|
|
|
|
2020-03-26 04:38:24 +01:00
|
|
|
if [ "$RUN_SECURITY_TESTS" = "true" ]; then
|
|
|
|
BEGIN_FOLD security-tests
|
|
|
|
DOCKER_EXEC make test-security-check
|
|
|
|
END_FOLD
|
|
|
|
fi
|
|
|
|
|
2019-01-16 17:49:01 +01:00
|
|
|
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
|
|
|
BEGIN_FOLD fuzz-tests
|
2019-07-09 20:28:16 +02:00
|
|
|
DOCKER_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 17:49:01 +01:00
|
|
|
END_FOLD
|
|
|
|
fi
|