Add a Maven-style test profile system for selective test execution #921
+214
−9
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.
Summary
This change introduces a Maven-style test profile system to our
build.xmlto allow for convenient, selective execution of test subsets without knowing all the class patterns to do the needful. It does this without creating any additional Ant targets that would pollute the-projecthelpoutput too.Usage
Profiles Introduced
I'd love to get some feedback on what other profiles might be useful here, or if the ones we have should be modified or eliminated.
Changes
build.xmlhas been updated with a newmacrodefand two internal targets to handle the profile logic, which were added to the test* targets as a dependency.build.properties.test-profilesfile was created to store the profile pattern definitions and keep thebuild.xmleasier to read..github/workflows/ci.ymlto use the new profile rather than the pattern list since I used theci.ymlpattern to create the smoke test profile.The changes are fully backwards compatible by using
test.entrytakes precedence, its easy to add new profiles with a one condition needed in thebuild.xmland the profile pattern in the properties file, and the CI workflow is simplified and easier to maintain.