Commit Graph

22 Commits

Author SHA1 Message Date
5cfb4133bf [5.x] Make time-based sharding namespace-agnostic and forward --test-directory (#1677)
* refactor(shard): extract parseListTestsOutput for testability

* test(shard): characterize parseListTestsOutput current behavior

* fix(shard): parse any PHP FQCN namespace from --list-tests

* fix(shard): forward --test-directory to list-tests subprocess

* chore: lint + snapshot fixups

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor(shard): make extracted helpers private, test via reflection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* revert visual_snapshot_of_help_command_output

* revert visual_snapshot_of_help_command_output

* keep function removeParallelArguments

* strip --processes argument when building list-tests command

The removeParallelArguments method was not filtering --processes flags, causing the list-tests subprocess to fail when parallel execution was enabled. This prevented time-based sharding from working correctly with the --parallel option.

Now both --parallel/-p and --processes arguments are removed from the command used to enumerate tests, ensuring the subprocess runs successfully.

* test: re-add namespace-agnostic sharding tests

- 5.x merge kept describe()-style test file, dropped PR #1677 tests for parseListTestsOutput + buildListTestsCommand. Re-add them in matching style.
- Also fix removeParallelArguments test broken by merge: source array_values() + strips --processes, so expects ['bin/pest','tests/'].

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-14 13:09:30 +01:00
d393799d2a Optimize buildFilterArgument in Shard plugin for compact regex generation and add comprehensive tests (#1675) 2026-06-12 20:06:50 +01:00
8467c64c22 fix: popArgument drops duplicate arguments breaking --parallel --exclude-gropup= (#1674)
* fix: popArgument drops duplicate arguments breaking --parallel multi-exclude-group

Fixes #1437

* fix: ensure popArgument handles duplicate arguments

* fix: update expected test results and snapshots after rebase

---------

Signed-off-by: nuno maduro <enunomaduro@gmail.com>
Co-authored-by: nuno maduro <enunomaduro@gmail.com>
2026-06-12 17:58:37 +01:00
97714a7088 Enforce filter length validation and add tests for Shard plugin (#1673) 2026-06-12 17:56:32 +01:00
9e4cf4b665 wip 2026-05-02 18:58:42 +01:00
4280233b40 wip 2026-05-02 18:37:24 +01:00
45cce6ce93 Style 2024-07-24 21:54:52 +01:00
f004591c5a fix: checking existing argument with equal sign 2024-01-02 15:03:46 +01:00
052b9e051b fix: --retry with parallel 2023-02-11 17:39:46 +00:00
d69f61c8d3 refacto: --retry option 2023-02-11 16:48:06 +00:00
0e0e2adfbe Fixes --version and --help 2022-09-17 23:47:47 +01:00
e9564febaf Migrates to Pint 2022-09-16 10:45:53 +01:00
1706e1d2e0 fix lint 2022-08-02 11:01:17 +02:00
106b279ed0 feat: adds --retry option 2021-12-04 21:18:55 +00:00
7f38de11b7 refactor: --ci option 2021-09-25 13:29:11 +01:00
601c4b01fc refactors to use a Plugin to parse --ci option 2021-09-22 14:53:16 +02:00
09a0a64f20 tests: update to use version() in test 2020-08-19 16:56:40 +01:00
832882160f feat(expect): updates test suite to use expectation api 2020-07-14 23:15:14 +02:00
db7c4b174f refactor: thanks 2020-07-01 20:23:00 +02:00
8e203e914e Add test for --thanks 2020-07-01 10:27:12 +01:00
a3644f7efa tests: fixes windows tests 2020-06-26 18:42:57 +02:00
9ea51caf3f feat: adds --version option 2020-06-26 18:17:11 +02:00