#111480runTests.sh splits e2e arguments containing spaces, e.g. --grep "a pattern"
Description
Problem
Build/Scripts/runTests.sh -s e2e -- --grep "logo in topbar" does not pass the pattern to Playwright as one argument. Playwright receives --grep logo in topbar: only the first word is the title filter, every further word becomes a file filter. Depending on the words this runs no test at all (“Error: No tests found.”) or nearly the whole suite.
The same happens for -s e2e-browser and -s e2e-prepare (including the command it prints for a local run), -s lintTypescript and -s phpstanGenerateBaseline.
Steps to reproduce
- Run
Build/Scripts/runTests.sh -s e2e -- --grep "logo in topbar" --liston main - Playwright is called as
playwright test --grep logo in topbar --list --project e2eand reports “No tests found”, although the test “TYPO3 logo in topbar links to backend root” exists
Cause
runPlaywright() joins the remaining arguments with $* into the string COMMAND and expands it unquoted in ${CONTAINER_BIN} run ... ${COMMAND}, so word splitting drops the original argument boundaries. Playwright reads each extra word as a case-insensitive regular expression on the spec file path. lintTypescript and phpstanGenerateBaseline put $@ into a string for /bin/sh -c, with the same effect.
Suggested fix
Build the Playwright and phpstan baseline commands as bash arrays and expand them with "${COMMAND[]}”@, as the composer, phpstan and npm suites already do. Pass the lintTypescript arguments to sh -c as positional parameters and use "$”@ there.
Reviews 3
History 17
-
Gerrit Code Review pushed patch set 1 for main to change 97762 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-17T17:34:46+00:00" > 11/17/26, 17:34 </span> -
Gerrit Code Review pushed patch set 2 for main to change 97762 <span data-processor="relativetime" data-value="2026-11-18T10:25:41+00:00" > 11/18/26, 10:25 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97787 <span data-processor="relativetime" data-value="2026-11-18T10:35:20+00:00" > 11/18/26, 10:35 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 97788 <span data-processor="relativetime" data-value="2026-11-18T10:35:35+00:00" > 11/18/26, 10:35 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 97787 <span data-processor="relativetime" data-value="2026-11-18T10:37:05+00:00" > 11/18/26, 10:37 </span>
-
Gerrit Code Review pushed patch set 2 for 13.4 to change 97788 <span data-processor="relativetime" data-value="2026-11-18T10:37:08+00:00" > 11/18/26, 10:37 </span>
-
Benjamin Kott commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-18T11:00:32+00:00" > 11/18/26, 11:00 </span>
Applied in changeset commit:decc27d57e6232cb17cf232dfa73f59b3a9a4822.