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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 def CreateVariantGenerator(self, variants): | 118 def CreateVariantGenerator(self, variants): |
119 """Return a generator for the testing variants of this suite. | 119 """Return a generator for the testing variants of this suite. |
120 | 120 |
121 Args: | 121 Args: |
122 variants: List of variant names to be run as specified by the test | 122 variants: List of variant names to be run as specified by the test |
123 runner. | 123 runner. |
124 Returns: An object of type VariantGenerator. | 124 Returns: An object of type VariantGenerator. |
125 """ | 125 """ |
126 return self._VariantGeneratorFactory()(self, set(variants)) | 126 return self._VariantGeneratorFactory()(self, set(variants)) |
127 | 127 |
| 128 def PrepareSources(self): |
| 129 """Called once before multiprocessing for doing file-system operations. |
| 130 |
| 131 This should not access the network. For network access use the method |
| 132 below. |
| 133 """ |
| 134 pass |
| 135 |
128 def DownloadData(self): | 136 def DownloadData(self): |
129 pass | 137 pass |
130 | 138 |
131 def ReadStatusFile(self, variables): | 139 def ReadStatusFile(self, variables): |
132 with open(self.status_file()) as f: | 140 with open(self.status_file()) as f: |
133 self.rules, self.wildcards = ( | 141 self.rules, self.wildcards = ( |
134 statusfile.ReadStatusFile(f.read(), variables)) | 142 statusfile.ReadStatusFile(f.read(), variables)) |
135 | 143 |
136 def ReadTestCases(self, context): | 144 def ReadTestCases(self, context): |
137 self.tests = self.ListTests(context) | 145 self.tests = self.ListTests(context) |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 return (testcase.flags + ["--gtest_filter=" + testcase.path] + | 351 return (testcase.flags + ["--gtest_filter=" + testcase.path] + |
344 ["--gtest_random_seed=%s" % context.random_seed] + | 352 ["--gtest_random_seed=%s" % context.random_seed] + |
345 ["--gtest_print_time=0"] + | 353 ["--gtest_print_time=0"] + |
346 context.mode_flags) | 354 context.mode_flags) |
347 | 355 |
348 def _VariantGeneratorFactory(self): | 356 def _VariantGeneratorFactory(self): |
349 return StandardVariantGenerator | 357 return StandardVariantGenerator |
350 | 358 |
351 def shell(self): | 359 def shell(self): |
352 return self.name | 360 return self.name |
OLD | NEW |