Runs tempest tests
This command is used for running the tempest tests
Tempest run has several options:
- --regex/-r: This is a selection regex like what testr uses. It will run
- any tests that match on re.match() with the regex
- --smoke/-s: Run all the tests tagged as smoke
There are also the --blacklist-file and --whitelist-file options that let you pass a filepath to tempest run with the file format being a line separated regex, with '#' used to signify the start of a comment on a line. For example:
# Regex file ^regex1 # Match these tests .*regex2 # Match those tests
The blacklist file will be used to construct a negative lookahead regex and the whitelist file will simply OR all the regexes in the file. The whitelist and blacklist file options are mutually exclusive so you can't use them together. However, you can combine either with a normal regex or the --smoke flag. When used with a blacklist file the generated regex will be combined to something like:
When combined with a whitelist file all the regexes from the file and the CLI regexes will be ORed.
You can also use the --list-tests option in conjunction with selection arguments to list which tests will be run.
There are several options to control how the tests are executed. By default tempest will run in parallel with a worker for each CPU present on the machine. If you want to adjust the number of workers use the --concurrency option and if you want to run tests serially use --serial/-t
Running with Workspaces¶
Tempest run enables you to run your tempest tests from any setup tempest
workspace it relies on you having setup a tempest workspace with either the
tempest init or
tempest workspace commands. Then using the
--workspace CLI option you can specify which one of your workspaces you
want to run tempest from. Using this option you don't have to run Tempest
directly with you current working directory being the workspace, Tempest will
take care of managing everything to be executed from there.
Running from Anywhere¶
Tempest run provides you with an option to execute tempest from anywhere on
your system. You are required to provide a config file in this case with the
--config-file option. When run tempest will create a .testrepository
directory and a .testr.conf file in your current working directory. This way
you can use testr commands directly to inspect the state of the previous run.
By default tempest run's output to STDOUT will be generated using the subunit-trace output filter. But, if you would prefer a subunit v2 stream be output to STDOUT use the --subunit flag