[feat] Add new syntax for attaching arbitrary regression test methods to pipeline stages #920
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.
This PR offers a new syntax for attaching arbitrary regression test methods to pipeline stages. This is achieved using the
@run_before(stage)or@run_after(stage)decorators, wherestageis a string representing a pipeline stage. Valid pipeline stages are the following:setup,compile,run,sanity,performanceandcleanup. This syntax will render less common or even obsolete the overriding of the pipeline methods, such assetup()for doing common tasks, such as setting the compilation flags. Users will not have to remember the signatures of the pipeline methods and to always callsuper(). For example, setting the compilation flags based on the programming environment can now be written very nicely as follows:Some pipeline stages, namely
compileandrun, are implemented as two phases: (a) launch the operation asynchronously and (b) wait for the operation to complete. In such cases the@run_afterdecorated functions will run after the stage is completed (i.e., after it is waited for).This is still WIP, because I need to update the documentation. Other than that, you are free to review.