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

Side by Side Diff: testing/scripts/telemetry_perf_unittests.py

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « testing/scripts/common.py ('k') | testing/scripts/telemetry_unittests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import json 6 import json
7 import os 7 import os
8 import sys 8 import sys
9 9
10 10
11 import common 11 import common
12 12
13 13
14 def main_run(args): 14 def main_run(args):
15 filter_tests = [] 15 filter_tests = []
16 if args.filter_file: 16 if args.filter_file:
17 filter_tests = json.load(args.filter_file) 17 filter_tests = json.load(args.filter_file)
18 18
19 with common.temporary_file() as tempfile_path: 19 with common.temporary_file() as tempfile_path:
20 rc = common.run_command([ 20 rc = common.run_runtest(args, [
21 sys.executable,
22 os.path.join(args.paths['build'], 'scripts', 'tools', 'runit.py'),
23 '--show-path',
24 sys.executable,
25 os.path.join(args.paths['build'], 'scripts', 'slave', 'runtest.py'),
26 '--target', args.build_config_fs,
27 '--xvfb',
28 '--annotate', 'gtest', 21 '--annotate', 'gtest',
29 '--test-type', 'telemetry_unittests', 22 '--test-type', 'telemetry_perf_unittests',
30 '--builder-name', args.properties['buildername'],
31 '--slave-name', args.properties['slavename'],
32 '--build-number', str(args.properties['buildnumber']),
33 '--run-python-script', 23 '--run-python-script',
34 os.path.join(common.SRC_DIR, 'tools', 'telemetry', 'run_tests'), 24 os.path.join(common.SRC_DIR, 'tools', 'perf', 'run_tests'),
35 '--browser', args.build_config_fs.lower(), 25 '--browser', args.build_config_fs.lower(),
36 '--retry-limit', '3', 26 '--retry-limit', '3',
37 '--write-full-results-to', tempfile_path, 27 '--write-full-results-to', tempfile_path,
38 ] + filter_tests) 28 ] + filter_tests)
39 29
40 with open(tempfile_path) as f: 30 with open(tempfile_path) as f:
41 results = json.load(f) 31 results = json.load(f)
42 32
43 parsed_results = common.parse_common_test_results(results, test_separator='.') 33 parsed_results = common.parse_common_test_results(results, test_separator='.')
44 failures = parsed_results['unexpected_failures'] 34 failures = parsed_results['unexpected_failures']
(...skipping 10 matching lines...) Expand all
55 def main_compile_targets(args): 45 def main_compile_targets(args):
56 json.dump(['chrome'], args.output) 46 json.dump(['chrome'], args.output)
57 47
58 48
59 if __name__ == '__main__': 49 if __name__ == '__main__':
60 funcs = { 50 funcs = {
61 'run': main_run, 51 'run': main_run,
62 'compile_targets': main_compile_targets, 52 'compile_targets': main_compile_targets,
63 } 53 }
64 sys.exit(common.run_script(sys.argv[1:], funcs)) 54 sys.exit(common.run_script(sys.argv[1:], funcs))
OLDNEW
« no previous file with comments | « testing/scripts/common.py ('k') | testing/scripts/telemetry_unittests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698