OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 | 6 |
7 from recipe_engine import recipe_api | 7 from recipe_engine import recipe_api |
8 from recipe_engine import util as recipe_util | 8 from recipe_engine import util as recipe_util |
9 | 9 |
10 class TestLauncherFilterFileInputPlaceholder(recipe_util.InputPlaceholder): | 10 class TestLauncherFilterFileInputPlaceholder(recipe_util.InputPlaceholder): |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 full_args.append('--perf-dashboard-id=%s' % perf_dashboard_id) | 305 full_args.append('--perf-dashboard-id=%s' % perf_dashboard_id) |
306 if perf_id: | 306 if perf_id: |
307 full_args.append('--perf-id=%s' % perf_id) | 307 full_args.append('--perf-id=%s' % perf_id) |
308 if perf_config: | 308 if perf_config: |
309 full_args.extend(['--perf-config', perf_config]) | 309 full_args.extend(['--perf-config', perf_config]) |
310 # This replaces the step_name that used to be sent via factory_properties. | 310 # This replaces the step_name that used to be sent via factory_properties. |
311 if test_type: | 311 if test_type: |
312 full_args.append('--test-type=%s' % test_type) | 312 full_args.append('--test-type=%s' % test_type) |
313 step_name = name or t_name | 313 step_name = name or t_name |
314 full_args.append('--step-name=%s' % step_name) | 314 full_args.append('--step-name=%s' % step_name) |
315 if chartjson_file: | 315 if chartjson_file and not 'step_test_data' in kwargs: |
316 full_args.append('--chartjson-file') | 316 full_args.append('--chartjson-file') |
317 full_args.append(self.m.json.output()) | 317 full_args.append(self.m.json.output()) |
318 kwargs['step_test_data'] = lambda: self.m.json.test_api.output([]) | 318 kwargs['step_test_data'] = lambda: self.m.json.test_api.output([]) |
319 if test_launcher_summary_output: | 319 if test_launcher_summary_output: |
320 full_args.extend([ | 320 full_args.extend([ |
321 '--test-launcher-summary-output', | 321 '--test-launcher-summary-output', |
322 test_launcher_summary_output | 322 test_launcher_summary_output |
323 ]) | 323 ]) |
324 if flakiness_dash: | 324 if flakiness_dash: |
325 full_args.extend([ | 325 full_args.extend([ |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 '--test', t_name, | 369 '--test', t_name, |
370 '--tool', self.c.runtests.memory_tool, | 370 '--tool', self.c.runtests.memory_tool, |
371 ]) | 371 ]) |
372 else: | 372 else: |
373 full_args.append(test) | 373 full_args.append(test) |
374 | 374 |
375 full_args.extend(self.c.runtests.test_args) | 375 full_args.extend(self.c.runtests.test_args) |
376 full_args.extend(args) | 376 full_args.extend(args) |
377 | 377 |
378 runtest_path = self.package_repo_resource('scripts', 'slave', 'runtest.py') | 378 runtest_path = self.package_repo_resource('scripts', 'slave', 'runtest.py') |
| 379 test_data_kwargs = {key: kwargs[key] |
| 380 for key in ['step_test_data', 'stdout', 'stderr'] |
| 381 if key in kwargs} |
379 if self.c.runtest_py.src_side and not disable_src_side_runtest_py: | 382 if self.c.runtest_py.src_side and not disable_src_side_runtest_py: |
380 runtest_path = self.m.path['checkout'].join( | 383 runtest_path = self.m.path['checkout'].join( |
381 'infra', 'scripts', 'runtest_wrapper.py') | 384 'infra', 'scripts', 'runtest_wrapper.py') |
382 # Note that -- is needed since full_args are not indended | 385 # Note that -- is needed since full_args are not indended |
383 # for wrapper script but for real runtest.py . | 386 # for wrapper script but for real runtest.py . |
384 full_args = ['--'] + full_args | 387 full_args = ['--'] + full_args |
385 return self.m.python( | 388 return self.m.python( |
386 step_name, | 389 step_name, |
387 runtest_path, | 390 runtest_path, |
388 full_args, | 391 full_args, |
389 **kwargs | 392 **test_data_kwargs |
390 ) | 393 ) |
391 | 394 |
392 def sizes(self, results_url=None, perf_id=None, platform=None, **kwargs): | 395 def sizes(self, results_url=None, perf_id=None, platform=None, **kwargs): |
393 """Return a sizes.py invocation. | 396 """Return a sizes.py invocation. |
394 This uses runtests.py to upload the results to the perf dashboard.""" | 397 This uses runtests.py to upload the results to the perf dashboard.""" |
395 sizes_script = self.package_repo_resource( | 398 sizes_script = self.package_repo_resource( |
396 'scripts', 'slave', 'chromium', 'sizes.py') | 399 'scripts', 'slave', 'chromium', 'sizes.py') |
397 sizes_args = ['--target', self.c.build_config_fs] | 400 sizes_args = ['--target', self.c.build_config_fs] |
398 if platform: | 401 if platform: |
399 sizes_args.extend(['--platform', platform]) | 402 sizes_args.extend(['--platform', platform]) |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 })) | 797 })) |
795 | 798 |
796 def get_annotate_by_test_name(self, test_name): | 799 def get_annotate_by_test_name(self, test_name): |
797 return 'graphing' | 800 return 'graphing' |
798 | 801 |
799 def download_lto_plugin(self): | 802 def download_lto_plugin(self): |
800 return self.m.python( | 803 return self.m.python( |
801 name='download LTO plugin', | 804 name='download LTO plugin', |
802 script=self.m.path['checkout'].join( | 805 script=self.m.path['checkout'].join( |
803 'build', 'download_gold_plugin.py')) | 806 'build', 'download_gold_plugin.py')) |
OLD | NEW |