Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to supply options for launchers and reporters at the top-level of test tree #417

Merged
merged 2 commits into from
Jun 15, 2024

Conversation

Bodigrim
Copy link
Collaborator

While tasty allows to configure OptionSet at any level of test tree, it often has any effect only on options of test providers (class IsTest). But test runners and reporters typically only look into the OptionSet they were given as an argument. This is not unreasonable: e. g., if an option is a log filename you cannot expect to change it in the middle of the run. It is however too restrictive: there is no way to use defaultMain but hardcode a global option, without passing it via command line.

applyTopLevelPlusTestOptions allows for a compromise: unwrap top-level PlusTestOptions from the TestTree and apply them to the OptionSet from command line. This way a user can wrap their tests in adjustOption / localOption forcing, for instance, NumThreads to 1.

Related to #406 and #414.

@Bodigrim Bodigrim marked this pull request as ready for review June 9, 2024 11:43
@Bodigrim
Copy link
Collaborator Author

Bodigrim commented Jun 9, 2024

This is ready for reivew, CC @martijnbastiaan.

Copy link
Contributor

@martijnbastiaan martijnbastiaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems sensible! Thanks for tagging, this one slipped by.

@martijnbastiaan
Copy link
Contributor

Oh, changelog + since annotation perhaps?

@Bodigrim
Copy link
Collaborator Author

Bodigrim commented Jun 9, 2024

Oh, changelog + since annotation perhaps?

Done, thanks.

@Bodigrim Bodigrim merged commit 89afe03 into master Jun 15, 2024
14 checks passed
@Bodigrim Bodigrim deleted the unwrap-options branch June 15, 2024 14:41
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