`customParameters` with a quoted value (`-testCategory "a;b"`, as the Unity manual shows) silently runs 0 tests since the CLI delegation
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- bash, docker, powershell, typescript
Línea de trabajo
Empieza por dist/platforms/ubuntu/steps/test.sh alrededor de las líneas 220-234 y compara después la división equivalente en build.sh, línea 163, y build.ps1, línea 114. Reproduce el caso de customParameters entrecomillado y verifica que el comportamiento elegido sea coherente en todos los scripts: conservar la intención de los argumentos de estilo shell o documentar claramente el contrato existente. La tarea está terminada cuando el flujo de trabajo reproducido ya no informa silenciosamente de una ejecución exitosa con cero tests, o cuando la limitación se hace explícita.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug description
The Unity Test Framework command-line reference — which game.ci's own customParameters docs link to — says a semicolon-separated list "should be formatted as a string enclosed in quotation marks", e.g. -testCategory "firstCategory;secondCategory". Those quotes are shell quotes: typed into a terminal, the shell removes them and Unity receives firstCategory;secondCategory.
Through the CLI's Docker path there is no layer that does that removal, so the quotes are delivered to Unity literally. Unity does not strip quotes from argv, the category filter matches nothing, and the run finishes with Test run completed. Exiting with code 0 (Ok). No tests were executed. — a green job that ran zero tests.
This is a behaviour change relative to the pre-CLI actions. unity-test-runner ≤ v4.3 / v5.0.0-beta.1 built the docker run argv with @actions/exec, whose argStringToArray toggles quote state and drops the quote characters, so the container env was already CUSTOM_PARAMETERS=-testCategory !IgnoreCI;!Integration … and the same workflow ran the full suite. Before #257 the CLI path crashed outright on this input (the inner " broke the --env NAME="…" wrapper); #257 correctly made the value reach the container verbatim, which turned the loud failure into this silent one. Escaping was the right fix at that layer — the remaining gap is in how test.sh splits CUSTOM_PARAMETERS.
How to reproduce
- uses: game-ci/[email protected] # → game-ci CLI v0.1.57
with:
customParameters: -testCategory "!IgnoreCI;!Integration" -testHelperScreenshotDirectory /github/workspace/artifacts/Screenshots
Unity's own argv dump in the log (6000.0.44f1, but identical on every version in the matrix):
COMMAND LINE ARGUMENTS:
…
-testCategory
"!IgnoreCI;!Integration"
…
Test run completed. Exiting with code 0 (Ok). No tests were executed.
- CLI v0.1.57, all five jobs green with
total="0": https://github.com/nowsprinting/UnityTestExamples/actions/runs/34415045587 - Same workflow on unity-test-runner v5.0.0-beta.1 (pre-CLI), 210 playmode + 1852 editmode tests executed: https://github.com/nowsprinting/UnityTestExamples/actions/runs/32160674823
Where it happens: dist/platforms/ubuntu/steps/test.sh expands $CUSTOM_PARAMETERS unquoted (v0.1.57 line 234) so it word-splits only — by design no eval, per the comment at lines 220-227. build.sh line 163 does the same, so unity-builder is affected the same way. build.ps1 (line 114) splits on whitespace and has the same limitation.
Expected behavior
Either
-
CUSTOM_PARAMETERSis split shell-style — quote removal, no expansion, no execution — so a value copied from the Unity manual works. One eval-free way: letxargsdo the parsing and only everprintfthe tokens back:mapfile -t customParameters < <(xargs printf '%s\n' <<< "$CUSTOM_PARAMETERS") … "${runTests[@]}" "${COVERAGE_FLAGS[@]}" "${customParameters[@]}"xargshonours single/double quotes and backslashes but never runs a shell, so the injection concern that ruled outevaldoesn't apply. (build.sh/build.ps1would want the same.)
or, if the split-on-whitespace contract is intentional,
- document on
customParametersthat values must not be quoted (the Unity manual's quoting is for interactive shells only), and ideally warn when a"or'is present inCUSTOM_PARAMETERS, since the current outcome — a green run that executed nothing — is the worst failure mode for a CI tool.
Additional details
- Related: #257 (verbatim env values — prerequisite for this to be observable), game-ci/unity-test-runner#310 (CLI delegation).
- The workaround on the user side is simply to drop the quotes (
-testCategory !IgnoreCI;!Integration); inside the container that is word-split into exactly the two argv entries Unity expects, and it also works on the pre-CLI actions.
- Lenguaje dominante
- TypeScript
- Estrellas
- 20
- Forks
- 11
- Merge medio
- 5 h 28 min
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de game-ci/cli
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 73/100
-
Forward Unity logs to consoleAbiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 32/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de game-ci/cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AykutSarac/jsoncrack.com#616 ·
-
nip27: long hashtag swallows the rest of the content, lone # gives an empty hashtagPosiblemente ocupada @bardrop la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
nbd-wtf/nostr-tools#578 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
backnotprop/plannotator#3427 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/Power-CAT-Copilot-Studio-Kit#942 ·
Los mantenedores suelen responder en 1 día
-
[BUG]: Duplicate preposition in heading and unformatted feedback text on Strengthen Argument pageAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AOSSIE-Org/DebateAI#801 · 1 comentario ·
Los mantenedores suelen responder en 1 día