aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-04-11 18:49:52 +0200
committerStefan Boberg <[email protected]>2026-04-11 18:49:52 +0200
commitbfc28a2c0ef2cb1d4b2f04e94bba23739cfdf639 (patch)
tree3c03fcadef33f2ec20d410bfc6a9d441695ce17a
parentAdd manual test workflow with configurable sanitizers and allocators (diff)
downloadzen-sb/manual-test-workflows.tar.xz
zen-sb/manual-test-workflows.zip
Use bash arrays for arg passing and add set -x for visibilitysb/manual-test-workflows
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.
-rw-r--r--.github/workflows/test_manual.yml51
1 files changed, 30 insertions, 21 deletions
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()