Skip to content

fix: accept --no-results and the --do-not-* test run history options with --parallel - #1982

Open
adilKhan72 wants to merge 1 commit into
pestphp:5.xfrom
adilKhan72:fix-parallel-cache-flags
Open

adilKhan72 wants to merge 1 commit into
pestphp:5.xfrom
adilKhan72:fix-parallel-cache-flags

Conversation

@adilKhan72

Copy link
Copy Markdown

What:

  • Bug Fix
  • New Feature

Description:

pest --parallel fails with these PHPUnit options, while pest without --parallel accepts them:

pest --parallel --no-results                       # The "--no-results" option does not exist.
pest --parallel --do-not-cache-result              # The "--do-not-cache-result" option does not exist.
pest --parallel --do-not-record-test-run-history   # The "--do-not-record-test-run-history" option does not exist.

The parallel handler removes --cache-result and --record-test-run-history before it passes the arguments to ParaTest, but not their --do-not-* counterparts or --no-results, and ParaTest does not know these options. The workers do not need them: ParaTest always runs the workers with --do-not-record-test-run-history and --no-output.

This PR removes the three options in the parallel handler. The --do-not-* options also stop the parent process from writing the merged test run history, so a parallel run gives the same result as a run without --parallel (before, it always wrote the history).

Tests were added to tests/Visual/Parallel.php for the three options and for the history file, with and without --do-not-*.

Related:

Found while looking into #1946.

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.

1 participant