mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
ci: Untangle CI_EXEC bash function
It contains a large `bash -c` string, which is hard to parse. So pull
out components:
* CI_EXEC is only called with absolute folders as args, so the `cd` is
not needed in CI_EXEC. It is only needed to specify the working dir of
running the tests in 03_test_script.sh, so move it there.
* The PATH modification is only needed after commit
4756114e50 to check that depends does
work properly, even when the PATH contains a space.
* This allows to also drop the `bash -c` and use the proper and safer
"$@" to forward args without the risk of word splitting.
This commit is contained in:
@@ -13,7 +13,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
fi
|
||||
|
||||
CI_EXEC () {
|
||||
$CI_EXEC_CMD_PREFIX bash -c "export PATH=\"/path_with space:\$PATH\" && cd \"${BASE_ROOT_DIR}\" && $*"
|
||||
$CI_EXEC_CMD_PREFIX "$@"
|
||||
}
|
||||
export -f CI_EXEC
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
set -ex
|
||||
|
||||
cd "${BASE_ROOT_DIR}"
|
||||
|
||||
export PATH="/path_with space:${PATH}"
|
||||
export ASAN_OPTIONS="detect_leaks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
|
||||
export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan"
|
||||
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:second_deadlock_stack=1"
|
||||
|
||||
Reference in New Issue
Block a user