From bfc28a2c0ef2cb1d4b2f04e94bba23739cfdf639 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Sat, 11 Apr 2026 18:49:52 +0200 Subject: Use bash arrays for arg passing and add set -x for visibility Shell string variables with spaces don't survive word splitting reliably. Switch to bash arrays so the -- separator and --malloc=... flags are passed as distinct argv entries to xmake. Also add set -x so the expanded command is visible in the GHA log. --- .github/workflows/test_manual.yml | 51 +++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 21 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test_manual.yml b/.github/workflows/test_manual.yml index 095828656..c2ec33499 100644 --- a/.github/workflows/test_manual.yml +++ b/.github/workflows/test_manual.yml @@ -91,16 +91,19 @@ jobs: - name: Build & Test shell: bash run: | - EXTRA_ARGS="" - MALLOC_ARG="" + set -x + ARGS=(test -v -y --run=${{ inputs.test_suite }} --junit) + PASSTHROUGH=() if [ "${{ inputs.malloc }}" != "default" ]; then - MALLOC_ARG="--malloc=${{ inputs.malloc }}" + PASSTHROUGH+=(--malloc=${{ inputs.malloc }}) fi - USER_ARGS="${{ inputs.extra_args }}" - if [ -n "$MALLOC_ARG" ] || [ -n "$USER_ARGS" ]; then - EXTRA_ARGS="-- $MALLOC_ARG $USER_ARGS" + if [ -n "${{ inputs.extra_args }}" ]; then + PASSTHROUGH+=(${{ inputs.extra_args }}) fi - xmake test -v -y --run=${{ inputs.test_suite }} --junit $EXTRA_ARGS + if [ ${#PASSTHROUGH[@]} -gt 0 ]; then + ARGS+=(-- "${PASSTHROUGH[@]}") + fi + xmake "${ARGS[@]}" - name: Kill test processes if: always() @@ -177,16 +180,19 @@ jobs: - name: Build & Test run: | - EXTRA_ARGS="" - MALLOC_ARG="" + set -x + ARGS=(test -v -y --run=${{ inputs.test_suite }} --junit) + PASSTHROUGH=() if [ "${{ inputs.malloc }}" != "default" ]; then - MALLOC_ARG="--malloc=${{ inputs.malloc }}" + PASSTHROUGH+=(--malloc=${{ inputs.malloc }}) + fi + if [ -n "${{ inputs.extra_args }}" ]; then + PASSTHROUGH+=(${{ inputs.extra_args }}) fi - USER_ARGS="${{ inputs.extra_args }}" - if [ -n "$MALLOC_ARG" ] || [ -n "$USER_ARGS" ]; then - EXTRA_ARGS="-- $MALLOC_ARG $USER_ARGS" + if [ ${#PASSTHROUGH[@]} -gt 0 ]; then + ARGS+=(-- "${PASSTHROUGH[@]}") fi - xmake test -v -y --run=${{ inputs.test_suite }} --junit $EXTRA_ARGS + xmake "${ARGS[@]}" - name: Kill test processes if: always() @@ -257,16 +263,19 @@ jobs: - name: Build & Test run: | - EXTRA_ARGS="" - MALLOC_ARG="" + set -x + ARGS=(test -v -y --run=${{ inputs.test_suite }} --junit) + PASSTHROUGH=() if [ "${{ inputs.malloc }}" != "default" ]; then - MALLOC_ARG="--malloc=${{ inputs.malloc }}" + PASSTHROUGH+=(--malloc=${{ inputs.malloc }}) + fi + if [ -n "${{ inputs.extra_args }}" ]; then + PASSTHROUGH+=(${{ inputs.extra_args }}) fi - USER_ARGS="${{ inputs.extra_args }}" - if [ -n "$MALLOC_ARG" ] || [ -n "$USER_ARGS" ]; then - EXTRA_ARGS="-- $MALLOC_ARG $USER_ARGS" + if [ ${#PASSTHROUGH[@]} -gt 0 ]; then + ARGS+=(-- "${PASSTHROUGH[@]}") fi - xmake test -v -y --run=${{ inputs.test_suite }} --junit $EXTRA_ARGS + xmake "${ARGS[@]}" - name: Kill test processes if: always() -- cgit v1.2.3