Merge "Fix typo and change regexp to regex"

This commit is contained in:
Jenkins 2017-01-30 14:28:38 +00:00 committed by Gerrit Code Review
commit 90cc78ab0a
4 changed files with 8 additions and 8 deletions

View File

@ -122,13 +122,13 @@ This will do a straight passthrough of the provided regex to testr.
When ostestr is asked to do more complex test selection than a sinlge regex, When ostestr is asked to do more complex test selection than a sinlge regex,
it will ask testr for a full list of tests than passing the filtered test list it will ask testr for a full list of tests than passing the filtered test list
back to testr. back to testr.
ostestr allows you do to do simple test exclusion via apssing rejection/black regexp:: ostestr allows you do to do simple test exclusion via apssing rejection/black regex::
$ ostestr --back-regex 'slow_tests|bad_tests' $ ostestr --black-regex 'slow_tests|bad_tests'
ostestr also allow you to combine these argumants:: ostestr also allow you to combine these argumants::
$ ostestr --regex ui\.interface --back-regexp 'slow_tests|bad_tests' $ ostestr --regex ui\.interface --black-regex 'slow_tests|bad_tests'
Here first we selected all tests which matches to 'ui\.interface', Here first we selected all tests which matches to 'ui\.interface',
than we are dropping all test which matches than we are dropping all test which matches
@ -147,7 +147,7 @@ start of a comment on a line. For example::
^regex1 # Excludes these tests ^regex1 # Excludes these tests
.*regex2 # exclude those tests .*regex2 # exclude those tests
The regexp used in the blacklist File or passed as argument, will be used The regex used in the blacklist File or passed as argument, will be used
to drop tests from the initial selection list. to drop tests from the initial selection list.
Will generate a list which will exclude both any tests Will generate a list which will exclude both any tests
matching '^regex1' and '.*regex2'. If a blacklist file is used in conjunction matching '^regex1' and '.*regex2'. If a blacklist file is used in conjunction

View File

@ -60,8 +60,8 @@ def get_parser(args):
help='Test rejection regex. If a test cases name ' help='Test rejection regex. If a test cases name '
'matches on re.search() operation , ' 'matches on re.search() operation , '
'it will be removed from the final test list. ' 'it will be removed from the final test list. '
'Effectively the black-regexp is added to ' 'Effectively the black-regex is added to '
' black regexp list, but you do need to edit a file. ' ' black regex list, but you do need to edit a file. '
'The black filtering happens after the initial ' 'The black filtering happens after the initial '
' white selection, which by default is everything.') ' white selection, which by default is everything.')
pretty = parser.add_mutually_exclusive_group() pretty = parser.add_mutually_exclusive_group()

View File

@ -70,7 +70,7 @@ def construct_list(blacklist_file, whitelist_file, regex, black_regex,
black_data = None black_data = None
if black_regex: if black_regex:
msg = "Skipped bacuse of regexp provided as a command line argument:" msg = "Skipped because of regex provided as a command line argument:"
record = (re.compile(black_regex), msg, []) record = (re.compile(black_regex), msg, [])
if black_data: if black_data:
black_data.append(record) black_data.append(record)

View File

@ -38,7 +38,7 @@ class TestBlackReader(base.TestCase):
self.assertEqual(r[2], []) self.assertEqual(r[2], [])
if r[1] == 'note': if r[1] == 'note':
note_cnt += 1 note_cnt += 1
self.assertIn('search', dir(r[0])) # like a compiled regexp self.assertIn('search', dir(r[0])) # like a compiled regex
self.assertEqual(note_cnt, 4) self.assertEqual(note_cnt, 4)