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

testament: decouple production of TestRuns #829

Merged

Conversation

zerbina
Copy link
Collaborator

@zerbina zerbina commented Aug 7, 2023

Summary

Separate production of test-run descriptions (TestRun) from actually
executing them, which slightly flattens the call hierarchy and
makes it easier to pass additional configuration state to execution.

Details

Instead of directly executing the runs, testSpec (which is renamed to
produceRuns) appends the descriptions to a provided list, leaving
how to execute the runs to the callsite. The testSpecWithNimcache
routine is only used with custom categories, where sequential execution
is, in most cases, required, so it still executes the runs directly.

The new run procedure takes a slice of tests runs and executes them.
Both the legacy testSpec overload and processCategory use it for
executing the runs produced by produceRuns.

In theory, it is now possible to first collect the runs for all non-
special-category tests before executing any of them.

Summary
=======

Separate production of test-run descriptions (`TestRun`) from actually
executing them, which slightly flattens the call hierarchy and
makes it easier to pass additional configuration state to execution.

Details
=======

Instead of directly executing the runs, `testSpec` (which is renamed to
`produceRuns`) appends the descriptions to a provided list, leaving
how to execute the runs to the callsite. The `testSpecWithNimcache`
routine is only used with custom categories, where sequential execution
is, in most cases, required, so it still executes the runs directly.

The new `run` procedure takes a slice of tests runs and executes them.
Both the legacy `testSpec` overload and `processCategory` use it for
executing the runs produced by `produceRuns`.

In theory, it is now possible to first collect the runs for all non-
special-category tests before executing any of them.
@zerbina zerbina added refactor Implementation refactor tool Improvements to non-compiler tooling labels Aug 7, 2023
@zerbina zerbina added this to the Tooling milestone Aug 7, 2023
Copy link
Collaborator

@saem saem left a comment

Choose a reason for hiding this comment

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

nice, I can probably port of my run parallelization code from an old testament PR.

@zerbina
Copy link
Collaborator Author

zerbina commented Aug 8, 2023

/merge

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Merge requested by: @zerbina

Contents after the first section break of the PR description has been removed and preserved below:


Notes for Reviewers

  • a preparation for per-target knownIssue support

@chore-runner chore-runner bot added this pull request to the merge queue Aug 8, 2023
Merged via the queue into nim-works:devel with commit b4c1a0b Aug 8, 2023
18 checks passed
@zerbina zerbina deleted the testament-decouple-test-run-production branch August 8, 2023 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Implementation refactor tool Improvements to non-compiler tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants