Commit 11d0d16e authored by machenbach's avatar machenbach Committed by Commit bot

[test] Fix merging of test outcomes

BUG=v8:5238

Review-Url: https://codereview.chromium.org/2216293002
Cr-Commit-Position: refs/heads/master@{#38362}
parent 28e3467a
......@@ -43,18 +43,20 @@ class TestSuiteTest(unittest.TestCase):
def test_filter_testcases_by_status_second_pass(self):
suite = TestSuite('foo', 'bar')
suite.tests = [
TestCase(suite, 'foo/bar', variant='default'),
TestCase(suite, 'foo/bar', variant='stress', flags=['-v']),
TestCase(suite, 'baz/bar', variant='default'),
TestCase(suite, 'baz/bar', variant='stress', flags=['-v']),
]
test1 = TestCase(suite, 'foo/bar')
test2 = TestCase(suite, 'baz/bar')
# Contrived outcomes from filtering by variant-independent rules.
suite.tests[0].outcomes = set(['PREV'])
suite.tests[1].outcomes = set(['PREV'])
suite.tests[2].outcomes = set(['PREV'])
suite.tests[3].outcomes = set(['PREV'])
test1.outcomes = set(['PREV'])
test2.outcomes = set(['PREV'])
suite.tests = [
test1.CopyAddingFlags(variant='default', flags=[]),
test1.CopyAddingFlags(variant='stress', flags=['-v']),
test2.CopyAddingFlags(variant='default', flags=[]),
test2.CopyAddingFlags(variant='stress', flags=['-v']),
]
suite.rules = {
'default': {
......
......@@ -45,7 +45,7 @@ class TestCase(object):
def CopyAddingFlags(self, variant, flags):
copy = TestCase(self.suite, self.path, variant, self.flags + flags,
self.override_shell)
copy.outcomes = self.outcomes
copy.outcomes = set(self.outcomes)
return copy
def PackTask(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment