idaholab / moose

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

Allow TestHarness to search-and-run test spec files in a specified directory #17506

Open milljm opened 3 years ago

milljm commented 3 years ago

Reason

In order to allow the testing of repositories strictly designed to hold spec, input, and gold files, we need the ability to tell the TestHarness to 'go here' and run tests.

Design

Modify os.walk routines to allow arbitrarily set directories.

Impact

Will allow the TestHarness to run tests outside the scope of hard coded locations (cwd /or testroot).

milljm commented 3 years ago

Turns out we have this feature available already:

./run_tests --spec-file /path/to/test/dir

help:
  --spec-file SPEC_FILE
                        Supply a path to the tests spec file to run the tests
                        found therein. Or supply a path to a directory in
                        which the TestHarness will search for tests. You can
                        further alter which tests spec files are found through
                        the use of -i and --re

Repurpose this PR to add a new option which calls this one, as --spec-file is poorly named.