зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset d0f48f9edd42 because manifestparser doesn't support inline comments
MozReview-Commit-ID: 9Cz5EybG7xA --HG-- extra : rebase_source : 651b9f65cb4b556e050da2da209904a77ba65693
This commit is contained in:
Родитель
29f8528a73
Коммит
413aef1a2c
|
@ -127,7 +127,6 @@ class subsuite(InstanceFilter):
|
|||
# itself (if the condition is true), or nothing.
|
||||
for test in tests:
|
||||
subsuite = test.get('subsuite', '')
|
||||
subsuite = subsuite.split('#', 1)[0].strip()
|
||||
if ',' in subsuite:
|
||||
try:
|
||||
subsuite, cond = subsuite.split(',')
|
||||
|
@ -138,8 +137,6 @@ class subsuite(InstanceFilter):
|
|||
test['subsuite'] = subsuite
|
||||
else:
|
||||
test['subsuite'] = ''
|
||||
else:
|
||||
test['subsuite'] = subsuite
|
||||
|
||||
# Filter on current subsuite
|
||||
if self.name is None:
|
||||
|
|
|
@ -8,9 +8,6 @@ subsuite=bar,foo=="bar"
|
|||
subsuite=baz
|
||||
|
||||
[test4]
|
||||
subsuite=baz # this has a comment too
|
||||
|
||||
[test5]
|
||||
[test6]
|
||||
[test7]
|
||||
subsuite=bar,foo=="szy" || foo=="bar"
|
||||
subsuite=bar,foo=="szy" || foo=="bar"
|
|
@ -71,9 +71,9 @@ class TestTestManifest(unittest.TestCase):
|
|||
manifest = TestManifest(manifests=(relative_path,))
|
||||
info = {'foo': 'bar'}
|
||||
|
||||
# 7 tests total
|
||||
# 6 tests total
|
||||
tests = manifest.active_tests(exists=False, **info)
|
||||
self.assertEquals(len(tests), 7)
|
||||
self.assertEquals(len(tests), 6)
|
||||
|
||||
# only 3 tests for subsuite bar when foo==bar
|
||||
tests = manifest.active_tests(exists=False,
|
||||
|
@ -81,16 +81,16 @@ class TestTestManifest(unittest.TestCase):
|
|||
**info)
|
||||
self.assertEquals(len(tests), 3)
|
||||
|
||||
# only 2 tests for subsuite baz, regardless of conditions
|
||||
# only 1 test for subsuite baz, regardless of conditions
|
||||
other = {'something': 'else'}
|
||||
tests = manifest.active_tests(exists=False,
|
||||
filters=[subsuite('baz')],
|
||||
**info)
|
||||
self.assertEquals(len(tests), 2)
|
||||
self.assertEquals(len(tests), 1)
|
||||
tests = manifest.active_tests(exists=False,
|
||||
filters=[subsuite('baz')],
|
||||
**other)
|
||||
self.assertEquals(len(tests), 2)
|
||||
self.assertEquals(len(tests), 1)
|
||||
|
||||
# 4 tests match when the condition doesn't match (all tests except
|
||||
# the unconditional subsuite)
|
||||
|
|
Загрузка…
Ссылка в новой задаче