idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.6k stars 1k forks source link

Make test harness support run all tests other than tests in a group #27554

Open YaqiWang opened 1 week ago

YaqiWang commented 1 week ago

Motivation

In Griffin, we will create a new group called xs_generation, which is used to mark tests requiring a time-consuming pre-test step of cross section generation. We would like to skip those tests in normal tests thus requiring this feature.

Design

We have command-line option -g or --group for testing only tests in a group. Maybe we can add a new option like --exclude-group.

Impact

Give application developers a new option for doing regression test.

milljm commented 1 week ago

I believe this option exists:

        parser.add_argument('--not_group', action='store', type=str, dest='not_group', help='Run only tests NOT in the named group')

But the option sure is odd. Should be a dash not an underscore. I bet I did that. Can you try this option and see if it works for you?

milljm commented 1 week ago

I will use this PR to fix any odds and ends.

There does not seem to be a unittest for this feature. I also want to fix the option not being dash separated phrase.

YaqiWang commented 1 week ago

Oh, sorry, I should have checked the --help output more closely. I verified that this --not_group works. Feel free to close this.

milljm commented 1 week ago

Oh no worries at all. I didn't know it existed either. I do want to fix the odd option being an underscore instead of the standard dash character. And I want to make a unittest for this.

Thank you for creating an issue!