Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: scripts/slave/recipe_modules/chromium/api.py

Issue 873403002: Add support for cc_perftests and other non-telemetry gtest based tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 slave import recipe_api 7 from slave import recipe_api
8 from slave import recipe_util 8 from slave import recipe_util
9 9
10 from . import builders 10 from . import builders
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 '--build-properties', self.m.json.dumps(self.build_properties), 629 '--build-properties', self.m.json.dumps(self.build_properties),
630 ] 630 ]
631 self.m.python( 631 self.m.python(
632 step_name, 632 step_name,
633 self.m.path['build'].join('scripts', 'slave', 'chromium', 633 self.m.path['build'].join('scripts', 'slave', 'chromium',
634 'archive_build.py'), 634 'archive_build.py'),
635 args, 635 args,
636 infra_step=True, 636 infra_step=True,
637 **kwargs) 637 **kwargs)
638 638
639 def list_gtest_perf_tests(self, buildername):
640 path_to_json = self.m.path['checkout'].join(
ghost stip (do not use) 2015/01/27 01:02:02 why not just use self.m.json.read() here?
641 'testing', 'buildbot', 'chromium.perf.json')
642
643 return self.m.python.inline(
644 'List Non-Telemetry Perf Tests',
645 """
646 import json
647 import os
648 import sys
649 builder_name = sys.argv[1]
650 json_input_path = sys.argv[2]
651 json_output_path = sys.argv[3]
652
653 with open(json_output_path, 'w') as dst:
654 if not os.path.exists(json_input_path):
655 json.dump({}, dst)
656 else:
657 with open(json_input_path, 'r') as src:
658 data = json.load(src).get(builder_name, {})
659 json.dump(data, dst)
660 """,
661 args=[buildername, path_to_json, self.m.json.output()],
662 step_test_data=lambda: self.m.json.test_api.output({
663 "cc_perftests": {
664 "cmd": "cc_perftests",
665 "perf_dashboard_id": "cc_perftests",
666 }
667 }))
668
639 def list_perf_tests(self, browser, num_shards, devices=[]): 669 def list_perf_tests(self, browser, num_shards, devices=[]):
640 args = ['list', '--browser', browser, '--json-output', 670 args = ['list', '--browser', browser, '--json-output',
641 self.m.json.output(), '--num-shards', num_shards] 671 self.m.json.output(), '--num-shards', num_shards]
642 for x in devices: 672 for x in devices:
643 args += ['--device', x] 673 args += ['--device', x]
644 674
645 return self.m.python( 675 return self.m.python(
646 'List Perf Tests', 676 'List Perf Tests',
647 self.m.path['checkout'].join('tools', 'perf', 'run_benchmark'), 677 self.m.path['checkout'].join('tools', 'perf', 'run_benchmark'),
648 args, 678 args,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 def get_compile_targets_for_scripts(self): 743 def get_compile_targets_for_scripts(self):
714 return self.m.python( 744 return self.m.python(
715 name='get compile targets for scripts', 745 name='get compile targets for scripts',
716 script=self.m.path['checkout'].join( 746 script=self.m.path['checkout'].join(
717 'testing', 'scripts', 'get_compile_targets.py'), 747 'testing', 'scripts', 'get_compile_targets.py'),
718 args=[ 748 args=[
719 '--output', self.m.json.output(), 749 '--output', self.m.json.output(),
720 '--', 750 '--',
721 ] + self.get_common_args_for_scripts(), 751 ] + self.get_common_args_for_scripts(),
722 step_test_data=lambda: self.m.json.test_api.output({})) 752 step_test_data=lambda: self.m.json.test_api.output({}))
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium/steps.py » ('j') | scripts/slave/recipe_modules/chromium_android/api.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698