OLD | NEW |
---|---|
1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 return module.GetSuite(name, root) | 95 return module.GetSuite(name, root) |
96 except ImportError: | 96 except ImportError: |
97 # Use default if no testcfg is present. | 97 # Use default if no testcfg is present. |
98 return GoogleTestSuite(name, root) | 98 return GoogleTestSuite(name, root) |
99 finally: | 99 finally: |
100 if f: | 100 if f: |
101 f.close() | 101 f.close() |
102 | 102 |
103 def __init__(self, name, root): | 103 def __init__(self, name, root): |
104 # Note: This might be called concurrently from different processes. | 104 # Note: This might be called concurrently from different processes. |
105 # Changing harddisk state should be done in 'SetupWorkingDirectory' below. | |
106 self.name = name # string | 105 self.name = name # string |
107 self.root = root # string containing path | 106 self.root = root # string containing path |
108 self.tests = None # list of TestCase objects | 107 self.tests = None # list of TestCase objects |
109 self.rules = None # dictionary mapping test path to list of outcomes | 108 self.rules = None # dictionary mapping test path to list of outcomes |
110 self.wildcards = None # dictionary mapping test paths to list of outcomes | 109 self.wildcards = None # dictionary mapping test paths to list of outcomes |
111 self.total_duration = None # float, assigned on demand | 110 self.total_duration = None # float, assigned on demand |
112 | 111 |
113 def SetupWorkingDirectory(self): | |
Michael Achenbach
2016/03/10 09:26:46
Please also remove the call in v8/tools/testrunner
Yang
2016/03/10 09:33:50
Thanks. I missed this one.
| |
114 # This is called once per test suite object in a multi-process setting. | |
115 # Multi-process-unsafe work-directory setup can go here. | |
116 pass | |
117 | |
118 def shell(self): | 112 def shell(self): |
119 return "d8" | 113 return "d8" |
120 | 114 |
121 def suffix(self): | 115 def suffix(self): |
122 return ".js" | 116 return ".js" |
123 | 117 |
124 def status_file(self): | 118 def status_file(self): |
125 return "%s/%s.status" % (self.root, self.name) | 119 return "%s/%s.status" % (self.root, self.name) |
126 | 120 |
127 # Used in the status file and for stdout printing. | 121 # Used in the status file and for stdout printing. |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
337 return (testcase.flags + ["--gtest_filter=" + testcase.path] + | 331 return (testcase.flags + ["--gtest_filter=" + testcase.path] + |
338 ["--gtest_random_seed=%s" % context.random_seed] + | 332 ["--gtest_random_seed=%s" % context.random_seed] + |
339 ["--gtest_print_time=0"] + | 333 ["--gtest_print_time=0"] + |
340 context.mode_flags) | 334 context.mode_flags) |
341 | 335 |
342 def _VariantGeneratorFactory(self): | 336 def _VariantGeneratorFactory(self): |
343 return StandardVariantGenerator | 337 return StandardVariantGenerator |
344 | 338 |
345 def shell(self): | 339 def shell(self): |
346 return self.name | 340 return self.name |
OLD | NEW |