| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 re | 5 import re |
| 6 from recipe_engine.types import freeze | 6 from recipe_engine.types import freeze |
| 7 | 7 |
| 8 | 8 |
| 9 class V8TestingVariants(object): | 9 class V8TestingVariants(object): |
| 10 """Immutable class to manage the testing variant passed to v8. | 10 """Immutable class to manage the testing variant passed to v8. |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 return True | 460 return True |
| 461 | 461 |
| 462 def _v8_collect_step(self, task, coverage_context=NULL_COVERAGE, **kwargs): | 462 def _v8_collect_step(self, task, coverage_context=NULL_COVERAGE, **kwargs): |
| 463 """Produces a step that collects and processes a result of a v8 task.""" | 463 """Produces a step that collects and processes a result of a v8 task.""" |
| 464 # Placeholder for the merged json output. | 464 # Placeholder for the merged json output. |
| 465 json_output = self.api.json.output(add_json_log=False) | 465 json_output = self.api.json.output(add_json_log=False) |
| 466 | 466 |
| 467 # Shim script's own arguments. | 467 # Shim script's own arguments. |
| 468 args = [ | 468 args = [ |
| 469 '--swarming-client-dir', self.api.swarming_client.path, | 469 '--swarming-client-dir', self.api.swarming_client.path, |
| 470 '--temp-root-dir', self.api.path['tmp_base'], | 470 '--temp-root-dir', self.api.path['tmp'], |
| 471 '--merged-test-output', json_output, | 471 '--merged-test-output', json_output, |
| 472 ] + coverage_context.get_swarming_collect_args() | 472 ] + coverage_context.get_swarming_collect_args() |
| 473 | 473 |
| 474 # Arguments for actual 'collect' command. | 474 # Arguments for actual 'collect' command. |
| 475 args.append('--') | 475 args.append('--') |
| 476 args.extend(self.api.swarming.get_collect_cmd_args(task)) | 476 args.extend(self.api.swarming.get_collect_cmd_args(task)) |
| 477 | 477 |
| 478 return self.api.python( | 478 return self.api.python( |
| 479 name=self.test['name'] + self.test_step_config.suffix, | 479 name=self.test['name'] + self.test_step_config.suffix, |
| 480 script=self.v8.resource('collect_v8_task.py'), | 480 script=self.v8.resource('collect_v8_task.py'), |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 # TODO(machenbach): Implement swarming for non-standard tests. | 768 # TODO(machenbach): Implement swarming for non-standard tests. |
| 769 if v8_api.bot_config.get('enable_swarming') and test_step_config.swarming: | 769 if v8_api.bot_config.get('enable_swarming') and test_step_config.swarming: |
| 770 tools_mapping = TOOL_TO_TEST_SWARMING | 770 tools_mapping = TOOL_TO_TEST_SWARMING |
| 771 else: | 771 else: |
| 772 tools_mapping = TOOL_TO_TEST | 772 tools_mapping = TOOL_TO_TEST |
| 773 | 773 |
| 774 # The tool the test is going to use. Default: V8 test runner (run-tests). | 774 # The tool the test is going to use. Default: V8 test runner (run-tests). |
| 775 tool = TEST_CONFIGS[test_step_config.name].get('tool', 'run-tests') | 775 tool = TEST_CONFIGS[test_step_config.name].get('tool', 'run-tests') |
| 776 test_cls = tools_mapping[tool] | 776 test_cls = tools_mapping[tool] |
| 777 return test_cls(test_step_config, api, v8_api) | 777 return test_cls(test_step_config, api, v8_api) |
| OLD | NEW |