зеркало из 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.
|
# itself (if the condition is true), or nothing.
|
||||||
for test in tests:
|
for test in tests:
|
||||||
subsuite = test.get('subsuite', '')
|
subsuite = test.get('subsuite', '')
|
||||||
subsuite = subsuite.split('#', 1)[0].strip()
|
|
||||||
if ',' in subsuite:
|
if ',' in subsuite:
|
||||||
try:
|
try:
|
||||||
subsuite, cond = subsuite.split(',')
|
subsuite, cond = subsuite.split(',')
|
||||||
|
@ -138,8 +137,6 @@ class subsuite(InstanceFilter):
|
||||||
test['subsuite'] = subsuite
|
test['subsuite'] = subsuite
|
||||||
else:
|
else:
|
||||||
test['subsuite'] = ''
|
test['subsuite'] = ''
|
||||||
else:
|
|
||||||
test['subsuite'] = subsuite
|
|
||||||
|
|
||||||
# Filter on current subsuite
|
# Filter on current subsuite
|
||||||
if self.name is None:
|
if self.name is None:
|
||||||
|
|
|
@ -8,9 +8,6 @@ subsuite=bar,foo=="bar"
|
||||||
subsuite=baz
|
subsuite=baz
|
||||||
|
|
||||||
[test4]
|
[test4]
|
||||||
subsuite=baz # this has a comment too
|
|
||||||
|
|
||||||
[test5]
|
[test5]
|
||||||
[test6]
|
[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,))
|
manifest = TestManifest(manifests=(relative_path,))
|
||||||
info = {'foo': 'bar'}
|
info = {'foo': 'bar'}
|
||||||
|
|
||||||
# 7 tests total
|
# 6 tests total
|
||||||
tests = manifest.active_tests(exists=False, **info)
|
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
|
# only 3 tests for subsuite bar when foo==bar
|
||||||
tests = manifest.active_tests(exists=False,
|
tests = manifest.active_tests(exists=False,
|
||||||
|
@ -81,16 +81,16 @@ class TestTestManifest(unittest.TestCase):
|
||||||
**info)
|
**info)
|
||||||
self.assertEquals(len(tests), 3)
|
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'}
|
other = {'something': 'else'}
|
||||||
tests = manifest.active_tests(exists=False,
|
tests = manifest.active_tests(exists=False,
|
||||||
filters=[subsuite('baz')],
|
filters=[subsuite('baz')],
|
||||||
**info)
|
**info)
|
||||||
self.assertEquals(len(tests), 2)
|
self.assertEquals(len(tests), 1)
|
||||||
tests = manifest.active_tests(exists=False,
|
tests = manifest.active_tests(exists=False,
|
||||||
filters=[subsuite('baz')],
|
filters=[subsuite('baz')],
|
||||||
**other)
|
**other)
|
||||||
self.assertEquals(len(tests), 2)
|
self.assertEquals(len(tests), 1)
|
||||||
|
|
||||||
# 4 tests match when the condition doesn't match (all tests except
|
# 4 tests match when the condition doesn't match (all tests except
|
||||||
# the unconditional subsuite)
|
# the unconditional subsuite)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче