Fix problem with defining rules#139
Merged
Leont merged 1 commit intoPerl-Toolchain-Gang:masterfrom Oct 13, 2025
Merged
Conversation
Member
|
I think this makes sense. I have to double-check if there aren't any use-cases that would break with this change but if so they aren't immediately obvious to me. |
Author
|
Hello, @Leont. How are you? Did you find any use-cases that would break with this change? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #75
I suppose problem is here:
https://github.com/Perl-Toolchain-Gang/Test-Harness/blob/master/lib/App/Prove.pm#L371-L383
This code returns:
For
prove --jobs=5 xx/*.t --rules='seq=xx/start.t' --rules='par=xx/t*' --rules='seq=xx/finish.tcommand.Though I am ok that tests are run in parallel by default. This line of code
$args{rules} = { par => [@rules] };breaks this state in documentation:https://metacpan.org/dist/Test-Harness/view/bin/prove#-rules
Solution
With this fix I am able to achieve this behavior: https://perldoc.perl.org/TAP::Parser::Scheduler#Rules-examples
For
prove --jobs=5 xx/*.t --rules='seq=xx/start.t' --rules='par=xx/t*' --rules='seq=xx/finish.tcommand when options are read the structure look correct:And the test
t/start.trun before everything,xx/t*in parallel after it. When finished thet/finish.tis run.