The launch.py
python script is used by CI to detect and run the functional tests using the avocado test framework. Tests to run/list can be specified by either their ftest relative path to the python test script (.e.g. ./ior/ior_small.py) or one or more avocado test tags (e.g. ior).
Selecting tests (tags)
One or more test method methods in one or more python test files can be selected by using avocado test tags. Tags can be combined to further filter out tests by using logical AND/OR operations. Tags can also be excluded by preceding them with a '-'. Specifying tags in a comma-separated list (w/o spaces) will work like an AND requiring a test to have all the tags specified. For example the “pr,-hw” (used by default in CI for Functional VM stages) runs any “pr” tagged test that does not also have a “hw” tag. Specifying tags in a space-separated list will behave like an OR requiring tests to have either tag specified. For example, “datamover ior“ will run any test with a “datamover” tag or a “ior” tag. These two specification types can be combined, e.g. “pr,hw,large multicontainerdelete“.
More information on tags is at Test Tags.
See https://daosio.atlassian.net/wiki/spaces/DAOS/pages/10984259629/Test+Tags#How-Does-Avocado-Handle-Sets-of-Tags%3F for details and examples.
Listing tests
The --list
/ -l
command line option is used to list any tests that match the tests/tags specified. Manually this can be useful for verifying the use of tags in tests or checking tags before using in a commit pragma.
...
To allow test portability, certain test requirements are specified in the test yaml with placeholders that launch.py can replace with real values. Launch.py creates a temporary copy of the test yaml file with the modifications applied for the test execution. Currently supported placeholders are:
...