| Index: tools/testrunner/objects/testcase.py
|
| diff --git a/tools/testrunner/objects/testcase.py b/tools/testrunner/objects/testcase.py
|
| index c7b445eaab4cec73bbc90dc3660b7bc6c84abac9..0ab06361b178546c232f4883bd57d28dd1e53f07 100644
|
| --- a/tools/testrunner/objects/testcase.py
|
| +++ b/tools/testrunner/objects/testcase.py
|
| @@ -29,10 +29,12 @@
|
| from . import output
|
|
|
| class TestCase(object):
|
| - def __init__(self, suite, path, flags=None, dependency=None):
|
| + def __init__(self, suite, path, variant='default', flags=None,
|
| + dependency=None):
|
| self.suite = suite # TestSuite object
|
| self.path = path # string, e.g. 'div-mod', 'test-api/foo'
|
| self.flags = flags or [] # list of strings, flags specific to this test
|
| + self.variant = variant # name of the used testing variant
|
| self.dependency = dependency # |path| for testcase that must be run first
|
| self.outcomes = set([])
|
| self.output = None
|
| @@ -40,8 +42,9 @@ class TestCase(object):
|
| self.duration = None # assigned during execution
|
| self.run = 1 # The nth time this test is executed.
|
|
|
| - def CopyAddingFlags(self, flags):
|
| - copy = TestCase(self.suite, self.path, self.flags + flags, self.dependency)
|
| + def CopyAddingFlags(self, variant, flags):
|
| + copy = TestCase(self.suite, self.path, variant, self.flags + flags,
|
| + self.dependency)
|
| copy.outcomes = self.outcomes
|
| return copy
|
|
|
| @@ -51,16 +54,16 @@ class TestCase(object):
|
| and returns them as a JSON serializable object.
|
| """
|
| assert self.id is not None
|
| - return [self.suitename(), self.path, self.flags,
|
| + return [self.suitename(), self.path, self.variant, self.flags,
|
| self.dependency, list(self.outcomes or []), self.id]
|
|
|
| @staticmethod
|
| def UnpackTask(task):
|
| """Creates a new TestCase object based on packed task data."""
|
| # For the order of the fields, refer to PackTask() above.
|
| - test = TestCase(str(task[0]), task[1], task[2], task[3])
|
| - test.outcomes = set(task[4])
|
| - test.id = task[5]
|
| + test = TestCase(str(task[0]), task[1], task[2], task[3], task[4])
|
| + test.outcomes = set(task[5])
|
| + test.id = task[6]
|
| test.run = 1
|
| return test
|
|
|
|
|