Skip to content

Commit fa1dbd0

Browse files
author
MarcoFalke
committed
ci: Remove CI_EXEC bloat in test/06_script_b.sh
1 parent fae8de9 commit fa1dbd0

File tree

2 files changed

+68
-65
lines changed

2 files changed

+68
-65
lines changed

ci/test/06_script_b.sh

Lines changed: 66 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -6,96 +6,98 @@
66

77
export LC_ALL=C.UTF-8
88

9+
set -ex
10+
911
if [[ $HOST = *-mingw32 ]]; then
1012
# Generate all binaries, so that they can be wrapped
11-
CI_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
12-
CI_EXEC make "$MAKEJOBS" -C src minisketch/test.exe VERBOSE=1
13-
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
13+
make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
14+
make "$MAKEJOBS" -C src minisketch/test.exe VERBOSE=1
15+
"${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
1416
fi
1517

1618
if [ -n "$QEMU_USER_CMD" ]; then
1719
# Generate all binaries, so that they can be wrapped
18-
CI_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
19-
CI_EXEC make "$MAKEJOBS" -C src minisketch/test VERBOSE=1
20-
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh"
20+
make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
21+
make "$MAKEJOBS" -C src minisketch/test VERBOSE=1
22+
"${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh"
2123
fi
2224

2325
if [ -n "$USE_VALGRIND" ]; then
24-
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh"
26+
"${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh"
2527
fi
2628

2729
if [ "$RUN_UNIT_TESTS" = "true" ]; then
28-
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
30+
bash -c "${TEST_RUNNER_ENV} DIR_UNIT_TEST_DATA=${DIR_UNIT_TEST_DATA} LD_LIBRARY_PATH=${DEPENDS_DIR}/${HOST}/lib make $MAKEJOBS check VERBOSE=1"
2931
fi
3032

3133
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
32-
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
34+
bash -c "${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"
3335
fi
3436

3537
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
36-
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=99999999 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" "${TEST_RUNNER_EXTRA}" --quiet --failfast
38+
bash -c "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=99999999 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA} --quiet --failfast"
3739
fi
3840

3941
if [ "${RUN_TIDY}" = "true" ]; then
4042
set -eo pipefail
41-
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
42-
( CI_EXEC run-clang-tidy-16 -quiet "${MAKEJOBS}" ) | grep -C5 "error"
43-
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/"
44-
CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/iwyu_tool.py"\
45-
" src/common/args.cpp"\
46-
" src/common/config.cpp"\
47-
" src/common/init.cpp"\
48-
" src/common/url.cpp"\
49-
" src/compat"\
50-
" src/dbwrapper.cpp"\
51-
" src/init"\
52-
" src/kernel"\
53-
" src/node/chainstate.cpp"\
54-
" src/node/chainstatemanager_args.cpp"\
55-
" src/node/mempool_args.cpp"\
56-
" src/node/minisketchwrapper.cpp"\
57-
" src/node/utxo_snapshot.cpp"\
58-
" src/node/validation_cache_args.cpp"\
59-
" src/policy/feerate.cpp"\
60-
" src/policy/packages.cpp"\
61-
" src/policy/settings.cpp"\
62-
" src/primitives/transaction.cpp"\
63-
" src/random.cpp"\
64-
" src/rpc/fees.cpp"\
65-
" src/rpc/signmessage.cpp"\
66-
" src/test/fuzz/string.cpp"\
67-
" src/test/fuzz/txorphan.cpp"\
68-
" src/test/fuzz/util/"\
69-
" src/test/util/coins.cpp"\
70-
" src/uint256.cpp"\
71-
" src/util/bip32.cpp"\
72-
" src/util/bytevectorhash.cpp"\
73-
" src/util/check.cpp"\
74-
" src/util/error.cpp"\
75-
" src/util/exception.cpp"\
76-
" src/util/getuniquepath.cpp"\
77-
" src/util/hasher.cpp"\
78-
" src/util/message.cpp"\
79-
" src/util/moneystr.cpp"\
80-
" src/util/serfloat.cpp"\
81-
" src/util/spanparsing.cpp"\
82-
" src/util/strencodings.cpp"\
83-
" src/util/string.cpp"\
84-
" src/util/syserror.cpp"\
85-
" src/util/threadinterrupt.cpp"\
86-
" src/zmq"\
87-
" -p . ${MAKEJOBS}"\
88-
" -- -Xiwyu --cxx17ns -Xiwyu --mapping_file=${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp"\
89-
" |& tee /tmp/iwyu_ci.out"
90-
export P_CI_DIR="${BASE_ROOT_DIR}/src"
91-
CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/fix_includes.py --nosafe_headers < /tmp/iwyu_ci.out"
92-
CI_EXEC "git --no-pager diff"
43+
cd "${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
44+
( run-clang-tidy-16 -quiet "${MAKEJOBS}" ) | grep -C5 "error"
45+
cd "${BASE_BUILD_DIR}/bitcoin-$HOST/"
46+
python3 "${DIR_IWYU}/include-what-you-use/iwyu_tool.py" \
47+
src/common/args.cpp \
48+
src/common/config.cpp \
49+
src/common/init.cpp \
50+
src/common/url.cpp \
51+
src/compat \
52+
src/dbwrapper.cpp \
53+
src/init \
54+
src/kernel \
55+
src/node/chainstate.cpp \
56+
src/node/chainstatemanager_args.cpp \
57+
src/node/mempool_args.cpp \
58+
src/node/minisketchwrapper.cpp \
59+
src/node/utxo_snapshot.cpp \
60+
src/node/validation_cache_args.cpp \
61+
src/policy/feerate.cpp \
62+
src/policy/packages.cpp \
63+
src/policy/settings.cpp \
64+
src/primitives/transaction.cpp \
65+
src/random.cpp \
66+
src/rpc/fees.cpp \
67+
src/rpc/signmessage.cpp \
68+
src/test/fuzz/string.cpp \
69+
src/test/fuzz/txorphan.cpp \
70+
src/test/fuzz/util \
71+
src/test/util/coins.cpp \
72+
src/uint256.cpp \
73+
src/util/bip32.cpp \
74+
src/util/bytevectorhash.cpp \
75+
src/util/check.cpp \
76+
src/util/error.cpp \
77+
src/util/exception.cpp \
78+
src/util/getuniquepath.cpp \
79+
src/util/hasher.cpp \
80+
src/util/message.cpp \
81+
src/util/moneystr.cpp \
82+
src/util/serfloat.cpp \
83+
src/util/spanparsing.cpp \
84+
src/util/strencodings.cpp \
85+
src/util/string.cpp \
86+
src/util/syserror.cpp \
87+
src/util/threadinterrupt.cpp \
88+
src/zmq \
89+
-p . "${MAKEJOBS}" \
90+
-- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp" \
91+
2>&1 | tee /tmp/iwyu_ci.out
92+
cd "${BASE_ROOT_DIR}/src"
93+
python3 "${DIR_IWYU}/include-what-you-use/fix_includes.py" --nosafe_headers < /tmp/iwyu_ci.out
94+
git --no-pager diff
9395
fi
9496

9597
if [ "$RUN_SECURITY_TESTS" = "true" ]; then
96-
CI_EXEC make test-security-check
98+
make test-security-check
9799
fi
98100

99101
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
100-
CI_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py "${FUZZ_TESTS_CONFIG}" "$MAKEJOBS" -l DEBUG "${DIR_FUZZ_IN}"
102+
bash -c "LD_LIBRARY_PATH=${DEPENDS_DIR}/${HOST}/lib test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} $MAKEJOBS -l DEBUG ${DIR_FUZZ_IN}"
101103
fi

ci/test_run_all.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ set -o errexit; source ./ci/test/00_setup_env.sh
1010
set -o errexit; source ./ci/test/04_install.sh
1111
set -o errexit; source ./ci/test/05_before_script.sh
1212
set -o errexit; source ./ci/test/06_script_a.sh
13-
set -o errexit; source ./ci/test/06_script_b.sh
13+
set -o errexit
14+
CI_EXEC "${BASE_ROOT_DIR}/ci/test/06_script_b.sh"
1415

1516
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
1617
echo "Stop and remove CI container by ID"

0 commit comments

Comments
 (0)