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

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

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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
« no previous file with comments | « testing/legion/run_task.py ('k') | third_party/boringssl/boringssl.gypi » ('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 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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
(...skipping 13 matching lines...) Expand all
24 gtest_args = [ 24 gtest_args = [
25 '--target', args.build_config_fs, 25 '--target', args.build_config_fs,
26 '--annotate', 'graphing', 26 '--annotate', 'graphing',
27 '--perf-id', perf_id, 27 '--perf-id', perf_id,
28 '--perf-dashboard-id', test_suite, 28 '--perf-dashboard-id', test_suite,
29 '--results-url', args.properties.get('results-url'), 29 '--results-url', args.properties.get('results-url'),
30 '--slave-name', args.properties.get('slavename'), 30 '--slave-name', args.properties.get('slavename'),
31 '--builder-name', args.properties.get('buildername'), 31 '--builder-name', args.properties.get('buildername'),
32 '--build-number', str(args.properties.get('buildnumber')), 32 '--build-number', str(args.properties.get('buildnumber')),
33 '--log-processor-output-file', tempfile_path, 33 '--log-processor-output-file', tempfile_path,
34 '--test-type', test_suite,
34 ] 35 ]
35 36
36 if 'android' == args.properties.get('target_platform'): 37 if 'android' == args.properties.get('target_platform'):
37 gtest_args.extend([ 38 gtest_args.extend([
38 '--no-xvfb', 39 '--no-xvfb',
39 '--run-python-script', os.path.join( 40 '--run-python-script', os.path.join(
40 args.paths['checkout'], 'build', 'android', 'test_runner.py'), 41 args.paths['checkout'], 'build', 'android', 'test_runner.py'),
41 'gtest', '--release', 42 'gtest', '--release',
42 '--suite', test_suite, 43 '--suite', test_suite,
43 '--verbose', 44 '--verbose',
44 ]) 45 ])
45 else: 46 else:
46 gtest_args.extend(['--xvfb', '--test-type', test_suite]) 47 gtest_args.extend(['--xvfb'])
47 gtest_args.extend(script_args) 48 gtest_args.extend(script_args)
48 49
49 rc = common.run_runtest(args, gtest_args + filter_tests) 50 rc = common.run_runtest(args, gtest_args + filter_tests)
50 51
51 with open(tempfile_path) as f: 52 with open(tempfile_path) as f:
52 results = json.load(f) 53 results = json.load(f)
53 54
54 json.dump({ 55 json.dump({
55 'valid': bool(rc == 0), 56 'valid': bool(rc == 0),
56 'failures': results['failed'], 57 'failures': results['failed'],
57 }, args.output) 58 }, args.output)
58 59
59 return rc 60 return rc
60 61
61 62
62 def main_compile_targets(args): 63 def main_compile_targets(args):
63 if 'android' == args.properties.get('target_platform'): 64 if 'android' == args.properties.get('target_platform'):
64 json.dump(['${name}_apk'], args.output) 65 json.dump(['${name}_apk'], args.output)
65 else: 66 else:
66 json.dump(['$name'], args.output) 67 json.dump(['$name'], args.output)
67 68
68 69
69 if __name__ == '__main__': 70 if __name__ == '__main__':
70 funcs = { 71 funcs = {
71 'run': main_run, 72 'run': main_run,
72 'compile_targets': main_compile_targets, 73 'compile_targets': main_compile_targets,
73 } 74 }
74 sys.exit(common.run_script(sys.argv[1:], funcs)) 75 sys.exit(common.run_script(sys.argv[1:], funcs))
OLDNEW
« no previous file with comments | « testing/legion/run_task.py ('k') | third_party/boringssl/boringssl.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698