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:
MarcoFalke
2025-10-29 12:31:34 +01:00
parent fa21fd1dc2
commit eeee02ea53
2 changed files with 4 additions and 1 deletions

View File

@@ -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

View File

@@ -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"