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

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

Issue 2871823003: Show stdout of command run by run_gtest_perf_test.py script (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | 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
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 """Runs an isolated non-Telemetry perf test . 6 """Runs an isolated non-Telemetry perf test .
7 7
8 The main contract is that the caller passes the arguments: 8 The main contract is that the caller passes the arguments:
9 9
10 --isolated-script-test-output=[FILENAME] 10 --isolated-script-test-output=[FILENAME]
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 extra_flags = [] 88 extra_flags = []
89 if len(rest_args) > 1: 89 if len(rest_args) > 1:
90 extra_flags = rest_args[1:] 90 extra_flags = rest_args[1:]
91 if IsWindows(): 91 if IsWindows():
92 executable = '.\%s.exe' % executable 92 executable = '.\%s.exe' % executable
93 else: 93 else:
94 executable = './%s' % executable 94 executable = './%s' % executable
95 with common.temporary_file() as tempfile_path: 95 with common.temporary_file() as tempfile_path:
96 rc = common.run_command_with_output([executable] + extra_flags, 96 rc = common.run_command_with_output([executable] + extra_flags,
97 env=env, stdoutfile=tempfile_path) 97 env=env, stdoutfile=tempfile_path)
98 with open(tempfile_path) as f:
99 print f.read()
98 100
99 # Now get the correct json format from the stdout to write to the 101 # Now get the correct json format from the stdout to write to the
100 # perf results file 102 # perf results file
101 results_processor = ( 103 results_processor = (
102 generate_legacy_perf_dashboard_json.LegacyResultsProcessor()) 104 generate_legacy_perf_dashboard_json.LegacyResultsProcessor())
103 charts = results_processor.GenerateJsonResults(tempfile_path) 105 charts = results_processor.GenerateJsonResults(tempfile_path)
104 # Write the returned encoded json to a the charts output file 106 # Write the returned encoded json to a the charts output file
105 with open(args.isolated_script_test_chartjson_output, 'w') as f: 107 with open(args.isolated_script_test_chartjson_output, 'w') as f:
106 f.write(charts) 108 f.write(charts)
107 except Exception: 109 except Exception:
(...skipping 25 matching lines...) Expand all
133 if __name__ == '__main__': 135 if __name__ == '__main__':
134 # Conform minimally to the protocol defined by ScriptTest. 136 # Conform minimally to the protocol defined by ScriptTest.
135 if 'compile_targets' in sys.argv: 137 if 'compile_targets' in sys.argv:
136 funcs = { 138 funcs = {
137 'run': None, 139 'run': None,
138 'compile_targets': main_compile_targets, 140 'compile_targets': main_compile_targets,
139 } 141 }
140 sys.exit(common.run_script(sys.argv[1:], funcs)) 142 sys.exit(common.run_script(sys.argv[1:], funcs))
141 sys.exit(main()) 143 sys.exit(main())
142 144
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698