Skip to content

Skip execution for empty test shards - #2041

Merged
MrPunyapal merged 4 commits into
pestphp:5.xfrom
haranishi:fix/skip-empty-shards
Nov 19, 2026
Merged

MrPunyapal merged 4 commits into
pestphp:5.xfrom
haranishi:fix/skip-empty-shards

Conversation

@haranishi

Copy link
Copy Markdown
Contributor

What

  • Bug Fix
  • New Feature

Description

When a shard has no assigned tests, Pest forwards the original arguments and can run the entire selection while reporting that zero files ran.

Apply a filter that matches no tests to an empty shard. This keeps the existing empty-suite exit policy in serial and parallel runs and makes --list-tests show the shard's selection.

Added CLI tests for both runners, --fail-on-empty-test-suite, and listing. The shard test suite also passes with the changes from #1829 applied locally. That PR changes how tests are assigned to shards.

@MrPunyapal
MrPunyapal merged commit 989c080 into pestphp:5.x Nov 19, 2026
7 checks passed
@MrPunyapal

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants