Simplify how modules extend regression tests. #1815
Draft
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.
Description
This PR reduces duplicated code to simplify how the modules (
xdmod-supremm
,xdmod-ondemand
) extend the regression tests.There are corresponding PRs for ubccr/xdmod-supremm#371 and ubccr/xdmod-ondemand#39.
This PR also adds OnDemand to the usage message in
tests/ci/runtest-include.sh
since new OnDemand regression tests are being added in ubccr/xdmod-ondemand#39.The duplicated code is reduced as follows:
MetricExplorerChartsTest.php::filterTestsProvider()
by copy-pasting that method and changing the values of$data_file
and$baseConfig
, this PR changes the code to:$data_file
relative to the file that defines the class whose instance is callingfilterTestsProvider()
, and$baseConfig
from a new static method calledgetFilterTestBaseConfig()
, which the module overrides.UsageExplorer{Cloud|Job|Resourcespecifications|Storage}Test
is abstracted into an abstract classaUsageExplorerTest
.runtests.sh
script, they simply source the mainruntests.sh
script.Motivation and Context
Code cleanup.
Tests performed
I made sure the same number of regressions tests ran and passed on this PR as the current head of
xdmod11.0
.TODO: test other modules in Docker
Checklist: