From 3e97aae8295c030830be72fa93112f8a27751c41 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 22 Feb 2018 13:39:59 -0500 Subject: [PATCH] Cleanup selection list args in tempest run The selection list arguments had a mutually exclusive flag set for no reason. There previously was a limitation in how the flags were used previously which made those flags mutually exclusive, however that hasn't been the case for some time. At the same time the docs on selection needed to be updated, because they showed incorrect internal details (even prior to the stestr migration) for the blacklist file. Instead of trying to detail the entire explanation, it now just links to the stestr docs. Change-Id: I90dfc15765057f876ebaf66abf5af24de0f675b9 --- tempest/cmd/run.py | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/tempest/cmd/run.py b/tempest/cmd/run.py index bd94fa9e38..1891827bc2 100644 --- a/tempest/cmd/run.py +++ b/tempest/cmd/run.py @@ -32,17 +32,9 @@ For example:: ^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:: - - ^((?!black_regex1|black_regex2).)*$cli_regex1 - -When combined with a whitelist file all the regexes from the file and the CLI -regexes will be ORed. +These arguments are just passed into stestr, you can refer to the stestr +selection docs for more details on how these operate: +http://stestr.readthedocs.io/en/latest/MANUAL.html#test-selection You can also use the ``--list-tests`` option in conjunction with selection arguments to list which tests will be run. @@ -230,21 +222,20 @@ class TempestRun(command.Command): regex.add_argument('--regex', '-r', default='', help='A normal stestr selection regex used to ' 'specify a subset of tests to run') - list_selector = parser.add_mutually_exclusive_group() - list_selector.add_argument('--whitelist-file', '--whitelist_file', - help="Path to a whitelist file, this file " - "contains a separate regex on each " - "newline.") - list_selector.add_argument('--blacklist-file', '--blacklist_file', - help='Path to a blacklist file, this file ' - 'contains a separate regex exclude on ' - 'each newline') - list_selector.add_argument('--load-list', '--load_list', - help='Path to a non-regex whitelist file, ' - 'this file contains a seperate test ' - 'on each newline. This command' - 'supports files created by the tempest' - 'run ``--list-tests`` command') + parser.add_argument('--whitelist-file', '--whitelist_file', + help="Path to a whitelist file, this file " + "contains a separate regex on each " + "newline.") + parser.add_argument('--blacklist-file', '--blacklist_file', + help='Path to a blacklist file, this file ' + 'contains a separate regex exclude on ' + 'each newline') + parser.add_argument('--load-list', '--load_list', + help='Path to a non-regex whitelist file, ' + 'this file contains a seperate test ' + 'on each newline. This command' + 'supports files created by the tempest' + 'run ``--list-tests`` command') # list only args parser.add_argument('--list-tests', '-l', action='store_true', help='List tests',