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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/scripts/common.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/scripts/perf_gtests.py
diff --git a/testing/scripts/perf_gtests.py b/testing/scripts/perf_gtests.py
new file mode 100755
index 0000000000000000000000000000000000000000..40bb445167de3af7a8ac9fe8c97c971d00c88a25
--- /dev/null
+++ b/testing/scripts/perf_gtests.py
@@ -0,0 +1,66 @@
+#!/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.
+# 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.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import json
+import os
+import sys
+
+
+import common
+
+
+def main_run(args):
+ filter_tests = []
+ if args.filter_file:
+ filter_tests = json.load(args.filter_file)
+
+ perf_id = args.properties.get('perf-id')
+ script_args = args.args
+ test_suite = script_args[0]
+
+ gtest_args = [
+ '--target', args.build_config_fs,
+ '--annotate', 'graphing',
+ '--perf-id', perf_id,
+ '--perf-dashboard-id', test_suite,
+ '--results-url', args.properties.get('results-url'),
+ '--slave-name', args.properties.get('slavename'),
+ '--builder-name', args.properties.get('buildername'),
+ '--build-number', str(args.properties.get('buildnumber')),
+ ]
+
+ if 'android' in perf_id:
+ gtest_args.extend([
+ '--no-xvfb',
+ '--run-python-script', os.path.join(
+ args.paths['checkout'], 'build', 'android', 'test_runner.py'),
+ 'gtest', '--release',
+ '--suite', test_suite,
+ '--verbose',
+ ])
+ else:
+ gtest_args.extend(['--xvfb', '--test-type', test_suite])
+ gtest_args.extend(script_args)
+
+ rc = common.run_runtest(args, gtest_args + filter_tests)
+
+ json.dump({
+ '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
+ '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
+ }, args.output)
+
+ return rc
+
+
+def main_compile_targets(args):
+ 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
+
+
+if __name__ == '__main__':
+ funcs = {
+ 'run': main_run,
+ 'compile_targets': main_compile_targets,
+ }
+ sys.exit(common.run_script(sys.argv[1:], funcs))
« 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