OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import collections | 5 import collections |
6 import contextlib | 6 import contextlib |
7 import copy | 7 import copy |
8 import itertools | 8 import itertools |
9 import json | 9 import json |
10 | 10 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 if self.m.chromium.c.lto and \ | 220 if self.m.chromium.c.lto and \ |
221 not self.m.chromium.c.env.LLVM_FORCE_HEAD_REVISION: | 221 not self.m.chromium.c.env.LLVM_FORCE_HEAD_REVISION: |
222 self.m.chromium.download_lto_plugin() | 222 self.m.chromium.download_lto_plugin() |
223 | 223 |
224 return update_step, bot_db | 224 return update_step, bot_db |
225 | 225 |
226 def generate_tests_from_test_spec(self, api, test_spec, builder_dict, | 226 def generate_tests_from_test_spec(self, api, test_spec, builder_dict, |
227 buildername, mastername, enable_swarming, swarming_dimensions, | 227 buildername, mastername, enable_swarming, swarming_dimensions, |
228 scripts_compile_targets, generators, bot_update_step): | 228 scripts_compile_targets, generators, bot_update_step): |
229 tests = builder_dict.get('tests', ()) | 229 tests = builder_dict.get('tests', ()) |
230 # TODO(phajdan.jr): Switch everything to scripts generators and simplify. | 230 # TODO(phajdan.jr): Switch everything to scripts generators and simplify. |
ghost stip (do not use)
2016/09/22 23:25:48
:D
| |
231 for generator in generators: | 231 for generator in generators: |
232 tests = ( | 232 tests = ( |
233 tuple(generator(api, self, mastername, buildername, test_spec, | 233 tuple(generator(api, self, mastername, buildername, test_spec, |
234 bot_update_step, enable_swarming=enable_swarming, | 234 bot_update_step, enable_swarming=enable_swarming, |
235 swarming_dimensions=swarming_dimensions, | 235 swarming_dimensions=swarming_dimensions, |
236 scripts_compile_targets=scripts_compile_targets)) + | 236 scripts_compile_targets=scripts_compile_targets)) + |
237 tests) | 237 tuple(tests)) |
ghost stip (do not use)
2016/09/22 23:25:48
did this not work before?
Paweł Hajdan Jr.
2016/09/23 01:14:54
Bots where this doesn't work (they use frozenset)
| |
238 return tests | 238 return tests |
239 | 239 |
240 def read_test_spec(self, api, test_spec_file): | 240 def read_test_spec(self, api, test_spec_file): |
241 test_spec_path = api.path['checkout'].join('testing', 'buildbot', | 241 test_spec_path = api.path['checkout'].join('testing', 'buildbot', |
242 test_spec_file) | 242 test_spec_file) |
243 test_spec_result = api.json.read( | 243 test_spec_result = api.json.read( |
244 'read test spec (%s)' % api.path.basename(test_spec_path), | 244 'read test spec (%s)' % api.path.basename(test_spec_path), |
245 test_spec_path, | 245 test_spec_path, |
246 step_test_data=lambda: api.json.test_api.output({})) | 246 step_test_data=lambda: api.json.test_api.output({})) |
247 test_spec_result.presentation.step_text = 'path: %s' % test_spec_path | 247 test_spec_result.presentation.step_text = 'path: %s' % test_spec_path |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1016 targets in |compile_targets|.""" | 1016 targets in |compile_targets|.""" |
1017 result = [] | 1017 result = [] |
1018 for test in tests: | 1018 for test in tests: |
1019 test_compile_targets = test.compile_targets(api) | 1019 test_compile_targets = test.compile_targets(api) |
1020 # Always return tests that don't require compile. Otherwise we'd never | 1020 # Always return tests that don't require compile. Otherwise we'd never |
1021 # run them. | 1021 # run them. |
1022 if ((set(compile_targets) & set(test_compile_targets)) or | 1022 if ((set(compile_targets) & set(test_compile_targets)) or |
1023 not test_compile_targets): | 1023 not test_compile_targets): |
1024 result.append(test) | 1024 result.append(test) |
1025 return result | 1025 return result |
OLD | NEW |