Bug 1150497 - Make manifestparser tags whitespace (instead of comma) delimited to conform to other attributes, r=chmanchester

This commit is contained in:
Andrew Halberstadt 2015-04-02 09:50:30 -04:00
parent 7f7c973956
commit fef8c3f868
2 changed files with 9 additions and 2 deletions

View File

@ -312,6 +312,13 @@ class tags(InstanceFilter):
InstanceFilter's __eq__ method, so multiple instances can be added.
Multiple tag filters is equivalent to joining tags with the AND operator.
To define a tag in a manifest, add a `tags` attribute to a test or DEFAULT
section. Tests can have multiple tags, in which case they should be
whitespace delimited. For example:
[test_foobar.html]
tags = foo bar
:param tags: A tag or list of tags to filter tests on
"""
unique = False
@ -327,7 +334,7 @@ class tags(InstanceFilter):
if 'tags' not in test:
continue
test_tags = [t.strip() for t in test['tags'].split(',')]
test_tags = [t.strip() for t in test['tags'].split()]
if any(t in self.tags for t in test_tags):
yield test

View File

@ -102,7 +102,7 @@ class BuiltinFilters(unittest.TestCase):
{"name": "test4", "disabled": "some reason"},
{"name": "test5", "subsuite": "baz"},
{"name": "test6", "subsuite": "baz,foo == 'bar'"},
{"name": "test7", "tags": "foo, bar"},
{"name": "test7", "tags": "foo bar"},
)
def test_skip_if(self):