Skip to content

Conversation

@aaronweeden
Copy link
Contributor

@aaronweeden aaronweeden commented Jan 29, 2024

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:

  • Rather than the modules overriding the method MetricExplorerChartsTest.php::filterTestsProvider() by copy-pasting that method and changing the values of $data_file and $baseConfig, this PR changes the code to:
    • determine the location of $data_file relative to the file that defines the class whose instance is calling filterTestsProvider(), and
    • obtain $baseConfig from a new static method called getFilterTestBaseConfig(), which the module overrides.
  • Duplicated code in the classes UsageExplorer{Cloud|Job|Resourcespecifications|Storage}Test is abstracted into an abstract class aUsageExplorerTest.
  • Rather than the modules redefining their own runtests.sh script, they simply source the main runtests.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:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@aaronweeden aaronweeden added qa / testing Updates/additions to tests maintenance / code quality Improvements and code cleanup. Not a new feature or enhancement to existing functionality. labels Jan 29, 2024
@aaronweeden aaronweeden added this to the 11.0.0 milestone Jan 29, 2024
@aaronweeden aaronweeden force-pushed the simplify-how-modules-extend-regression-tests branch from 75ffc12 to 08153e4 Compare January 29, 2024 21:15
@aaronweeden aaronweeden removed this from the 11.0.0 milestone May 1, 2024
@aaronweeden aaronweeden force-pushed the simplify-how-modules-extend-regression-tests branch from 08153e4 to f617e8c Compare February 7, 2025 16:31
@aaronweeden aaronweeden changed the base branch from main to xdmod11.0 February 7, 2025 16:31
@aaronweeden aaronweeden added this to the 11.0.1 milestone Feb 7, 2025
@aaronweeden aaronweeden modified the milestones: 11.0.1, 11.5.0 Feb 7, 2025
@aaronweeden aaronweeden removed this from the 11.5.0 milestone Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance / code quality Improvements and code cleanup. Not a new feature or enhancement to existing functionality. qa / testing Updates/additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant