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

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

Issue 2331993003: Updating isolate scripts to read in chartjson telemetry results (Closed)
Patch Set: Adding flag to parser Created 4 years, 3 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 | testing/scripts/run_telemetry_as_googletest.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 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 isolate bundled Telemetry GPU integration test. 6 """Runs an isolate bundled Telemetry GPU integration test.
7 7
8 This script attempts to emulate the contract of gtest-style tests 8 This script attempts to emulate the contract of gtest-style tests
9 invoked via recipes. The main contract is that the caller passes the 9 invoked via recipes. The main contract is that the caller passes the
10 argument: 10 argument:
(...skipping 26 matching lines...) Expand all
37 # Importing it and using its get_sandbox_env breaks test runs on Linux 37 # Importing it and using its get_sandbox_env breaks test runs on Linux
38 # (it seems to unset DISPLAY). 38 # (it seems to unset DISPLAY).
39 CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX' 39 CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX'
40 CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox' 40 CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox'
41 41
42 def main(): 42 def main():
43 parser = argparse.ArgumentParser() 43 parser = argparse.ArgumentParser()
44 parser.add_argument( 44 parser.add_argument(
45 '--isolated-script-test-output', type=str, 45 '--isolated-script-test-output', type=str,
46 required=True) 46 required=True)
47 parser.add_argument(
48 '--isolated-script-test-chartjson-output', type=argparse.FileType('w'),
49 required=False)
47 parser.add_argument('--xvfb', help='Start xvfb.', action='store_true') 50 parser.add_argument('--xvfb', help='Start xvfb.', action='store_true')
48 args, rest_args = parser.parse_known_args() 51 args, rest_args = parser.parse_known_args()
52
49 xvfb_proc = None 53 xvfb_proc = None
50 openbox_proc = None 54 openbox_proc = None
51 xcompmgr_proc = None 55 xcompmgr_proc = None
52 env = os.environ.copy() 56 env = os.environ.copy()
53 # Assume we want to set up the sandbox environment variables all the 57 # Assume we want to set up the sandbox environment variables all the
54 # time; doing so is harmless on non-Linux platforms and is needed 58 # time; doing so is harmless on non-Linux platforms and is needed
55 # all the time on Linux. 59 # all the time on Linux.
56 env[CHROME_SANDBOX_ENV] = CHROME_SANDBOX_PATH 60 env[CHROME_SANDBOX_ENV] = CHROME_SANDBOX_PATH
57 if args.xvfb and xvfb.should_start_xvfb(env): 61 if args.xvfb and xvfb.should_start_xvfb(env):
58 xvfb_proc, openbox_proc, xcompmgr_proc = xvfb.start_xvfb(env=env, 62 xvfb_proc, openbox_proc, xcompmgr_proc = xvfb.start_xvfb(env=env,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 112
109 if __name__ == '__main__': 113 if __name__ == '__main__':
110 # Conform minimally to the protocol defined by ScriptTest. 114 # Conform minimally to the protocol defined by ScriptTest.
111 if 'compile_targets' in sys.argv: 115 if 'compile_targets' in sys.argv:
112 funcs = { 116 funcs = {
113 'run': None, 117 'run': None,
114 'compile_targets': main_compile_targets, 118 'compile_targets': main_compile_targets,
115 } 119 }
116 sys.exit(common.run_script(sys.argv[1:], funcs)) 120 sys.exit(common.run_script(sys.argv[1:], funcs))
117 sys.exit(main()) 121 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | testing/scripts/run_telemetry_as_googletest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698