@@ -43,15 +43,19 @@ source "$ROOT/scripts/path-safety.sh"
4343# Forward CC/CXX and collect make-passthrough args. BUILD_DIR is honored for
4444# the explicit target path below so containerized legs can build in their own
4545# directory instead of clobbering the host's native build/c artifacts.
46- MAKE_ARGS=" "
46+ # MAKE_ARGS is an ARRAY so a VAR=VAL whose value contains spaces (the
47+ # windows-11-arm leg passes SANITIZE with four flags) survives as ONE make
48+ # argument. The old string accumulation re-split it at every expansion and
49+ # make swallowed the second flag's leading -f as its makefile option.
50+ MAKE_ARGS=()
4751BUILD_DIR=" build/c"
4852for arg in " $@ " ; do
4953 case " $arg " in
5054 CC=* |CXX=* ) export " ${arg} " ;;
5155 --arch|--arch=* ) ;; # already handled
5256 arm64|x86_64) ;; # already handled
53- BUILD_DIR=* ) BUILD_DIR=" ${arg# BUILD_DIR=} " ; MAKE_ARGS= " $MAKE_ARGS $ arg" ;;
54- * =* ) MAKE_ARGS= " $MAKE_ARGS $ arg" ;; # forward any VAR=VAL to make
57+ BUILD_DIR=* ) BUILD_DIR=" ${arg# BUILD_DIR=} " ; MAKE_ARGS+=( " $ arg" ) ;;
58+ * =* ) MAKE_ARGS+=( " $ arg" ) ;; # forward any VAR=VAL to make
5559 esac
5660done
5761
@@ -92,11 +96,11 @@ BUILD_DIR="$BUILD_DIR" scripts/clean.sh
9296# the suite set is enumerated from the runner itself and union-guarded, and
9397# pass/fail/skip totals aggregate to the same numbers as the sequential run).
9498# CBM_TEST_SEQUENTIAL=1 restores the single-process runner.
95- make -j" $NPROC " -f Makefile.cbm " $BUILD_DIR /test-runner" $MAKE_ARGS
99+ make -j" $NPROC " -f Makefile.cbm " $BUILD_DIR /test-runner" ${ MAKE_ARGS[@]+ " ${MAKE_ARGS[@]} " }
96100if [ " ${CBM_TEST_SEQUENTIAL:- 0} " = " 1" ]; then
97- make -f Makefile.cbm test $MAKE_ARGS
101+ make -f Makefile.cbm test ${ MAKE_ARGS[@]+ " ${MAKE_ARGS[@]} " }
98102else
99- make -f Makefile.cbm test-par $MAKE_ARGS
103+ make -f Makefile.cbm test-par ${ MAKE_ARGS[@]+ " ${MAKE_ARGS[@]} " }
100104fi
101105
102106# Step 4: C++ large-TU index-hang regression guard (#410). Runs the PROD binary
111115# Step 5: Parent-death watchdog regression (#406/#407). Builds the prod stdio
112116# binary and verifies it self-exits when its launching parent is killed.
113117echo " === Step 5: parent-death watchdog regression (#406/#407) ==="
114- make -j" $NPROC " -f Makefile.cbm cbm $MAKE_ARGS
118+ make -j" $NPROC " -f Makefile.cbm cbm ${ MAKE_ARGS[@]+ " ${MAKE_ARGS[@]} " }
115119bash " $ROOT /tests/test_parent_watchdog.sh"
116120
117121# Step 5b: worker-mode parent-death watchdog (#845). A supervised index worker
0 commit comments