| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 return test_runner | 304 return test_runner |
| 305 | 305 |
| 306 def get_tests(self, bot_config, bot_db): | 306 def get_tests(self, bot_config, bot_db): |
| 307 """Returns a tuple: list of tests, and list of tests on the triggered | 307 """Returns a tuple: list of tests, and list of tests on the triggered |
| 308 testers.""" | 308 testers.""" |
| 309 | 309 |
| 310 assert isinstance(bot_db, bdb_module.BotConfigAndTestDB), \ | 310 assert isinstance(bot_db, bdb_module.BotConfigAndTestDB), \ |
| 311 "bot_db argument %r was not a BotConfigAndTestDB" % (bot_db) | 311 "bot_db argument %r was not a BotConfigAndTestDB" % (bot_db) |
| 312 | 312 |
| 313 return bot_config.get_tests(bot_db) | 313 tests, tests_including_triggered = bot_config.get_tests(bot_db) |
| 314 |
| 315 if bot_config.get('goma_canary') or bot_config.get('goma_staging'): |
| 316 tests.insert(0, steps.DiagnoseGomaTest()) |
| 317 tests_including_triggered.insert(0, steps.DiagnoseGomaTest()) |
| 318 |
| 319 return tests, tests_including_triggered |
| 314 | 320 |
| 315 def get_compile_targets(self, bot_config, bot_db, tests): | 321 def get_compile_targets(self, bot_config, bot_db, tests): |
| 316 assert isinstance(bot_db, bdb_module.BotConfigAndTestDB), \ | 322 assert isinstance(bot_db, bdb_module.BotConfigAndTestDB), \ |
| 317 "bot_db argument %r was not a BotConfigAndTestDB" % (bot_db) | 323 "bot_db argument %r was not a BotConfigAndTestDB" % (bot_db) |
| 318 | 324 |
| 319 compile_targets = bot_config.get_compile_targets(self, bot_db, tests) | 325 compile_targets = bot_config.get_compile_targets(self, bot_db, tests) |
| 320 return sorted(set(compile_targets)) | 326 return sorted(set(compile_targets)) |
| 321 | 327 |
| 322 def transient_check(self, update_step, command): | 328 def transient_check(self, update_step, command): |
| 323 """Runs command, checking for transience if this is a try job. | 329 """Runs command, checking for transience if this is a try job. |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 def get_compile_targets_for_scripts(self): | 845 def get_compile_targets_for_scripts(self): |
| 840 return self.m.python( | 846 return self.m.python( |
| 841 name='get compile targets for scripts', | 847 name='get compile targets for scripts', |
| 842 script=self.m.path['checkout'].join( | 848 script=self.m.path['checkout'].join( |
| 843 'testing', 'scripts', 'get_compile_targets.py'), | 849 'testing', 'scripts', 'get_compile_targets.py'), |
| 844 args=[ | 850 args=[ |
| 845 '--output', self.m.json.output(), | 851 '--output', self.m.json.output(), |
| 846 '--', | 852 '--', |
| 847 ] + self.get_common_args_for_scripts(), | 853 ] + self.get_common_args_for_scripts(), |
| 848 step_test_data=lambda: self.m.json.test_api.output({})) | 854 step_test_data=lambda: self.m.json.test_api.output({})) |
| OLD | NEW |