Put test 'args' at the end of the test command

For test commands, there can be arguments passed to the test binary like `-- --ignored` or `--
--test-threads=1`. For these cases to work properly, the `args` parameter needs to be added to the
end of the 'test' command.
This commit is contained in:
Aditya Manthramurthy
2024-11-03 16:24:56 -08:00
committed by Dave Rolsky
parent 294bb6a7fe
commit 9e709706e7
4 changed files with 24 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ runs:
working-directory: ${{ inputs.working-directory }}
shell: bash
run: |
${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} test ${{ inputs.args }} --target ${{ inputs.target }}
${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} test --target ${{ inputs.target }} ${{ inputs.args }}
if: inputs.command != 'build' && runner.os != 'Windows'
# We want to run in Powershell on Windows to make sure we compile in a
# native Windows environment. Some things won't compile properly under
@@ -105,7 +105,7 @@ runs:
working-directory: ${{ inputs.working-directory }}
shell: powershell
run: |
& ${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} test ${{ inputs.args }} --target ${{ inputs.target }}
& ${{ steps.set-build-command.outputs.build-command }} +${{inputs.toolchain}} test --target ${{ inputs.target }} ${{ inputs.args }}
if: inputs.command != 'build' && runner.os == 'Windows'
- name: Build binary (*nix)
working-directory: ${{ inputs.working-directory }}