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

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

Issue 890653002: Add support for cc_perftests and other non-telemetry gtest based tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Emptied json file. Created 5 years, 10 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/scripts/common.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
Paweł Hajdan Jr. 2015/01/30 12:16:53 nit: Rename the file to start with "gtest_". We ma
shatch 2015/01/30 16:46:52 Done.
2 # Copyright 2014 The Chromium Authors. All rights reserved.
Paweł Hajdan Jr. 2015/01/30 12:16:52 nit: 2015
shatch 2015/01/30 16:46:52 Done.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import json
7 import os
8 import sys
9
10
11 import common
12
13
14 def main_run(args):
15 filter_tests = []
16 if args.filter_file:
17 filter_tests = json.load(args.filter_file)
18
19 perf_id = args.properties.get('perf-id')
20 script_args = args.args
21 test_suite = script_args[0]
22
23 gtest_args = [
24 '--target', args.build_config_fs,
25 '--annotate', 'graphing',
26 '--perf-id', perf_id,
27 '--perf-dashboard-id', test_suite,
28 '--results-url', args.properties.get('results-url'),
29 '--slave-name', args.properties.get('slavename'),
30 '--builder-name', args.properties.get('buildername'),
31 '--build-number', str(args.properties.get('buildnumber')),
32 ]
33
34 if 'android' in perf_id:
35 gtest_args.extend([
36 '--no-xvfb',
37 '--run-python-script', os.path.join(
38 args.paths['checkout'], 'build', 'android', 'test_runner.py'),
39 'gtest', '--release',
40 '--suite', test_suite,
41 '--verbose',
42 ])
43 else:
44 gtest_args.extend(['--xvfb', '--test-type', test_suite])
45 gtest_args.extend(script_args)
46
47 rc = common.run_runtest(args, gtest_args + filter_tests)
48
49 json.dump({
50 'valid': bool(rc <= common.MAX_FAILURES_EXIT_STATUS and rc == 0),
Paweł Hajdan Jr. 2015/01/30 12:16:53 Does gtest really use MAX_FAILURES_EXIT_STATUS?
shatch 2015/01/30 16:46:52 Yeah you're right, was just a leftover from copyin
51 'failures': [],
Paweł Hajdan Jr. 2015/01/30 12:16:53 Sorry, this really *needs* to return actual list o
shatch 2015/01/30 16:46:52 There didn't seem to be any existing functionality
52 }, args.output)
53
54 return rc
55
56
57 def main_compile_targets(args):
58 json.dump(['chrome'], args.output)
Paweł Hajdan Jr. 2015/01/30 12:16:53 This is suspicious - it seems this should request
shatch 2015/01/30 16:46:52 The perf bots don't actually build anything, so I
Paweł Hajdan Jr. 2015/01/30 21:22:39 Sorry, I don't think it's correct. The chromium/ch
shatch 2015/02/09 19:45:17 Ok, I've included a list of supported gtests now.
Paweł Hajdan Jr. 2015/02/10 08:27:03 I believe we'll need a more sophisticated solution
59
60
61 if __name__ == '__main__':
62 funcs = {
63 'run': main_run,
64 'compile_targets': main_compile_targets,
65 }
66 sys.exit(common.run_script(sys.argv[1:], funcs))
OLDNEW
« no previous file with comments | « testing/scripts/common.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698