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

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

Issue 2358013002: Updating isolated scripts to ignore chartjson results dir flag. (Closed)
Patch Set: 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)
50 parser.add_argument('--xvfb', help='Start xvfb.', action='store_true') 47 parser.add_argument('--xvfb', help='Start xvfb.', action='store_true')
51 args, rest_args = parser.parse_known_args() 48 args, rest_args = parser.parse_known_args()
49 # Remove the chartjson extra arg until this script cares about chartjson
50 # results from telemetry
51 index = 0
52 for arg in rest_args:
53 if '--isolated-script-test-chartjson-output' in arg:
54 rest_args.pop(index)
55 break
56 index += 1
Ken Russell (switch to Gerrit) 2016/09/21 18:48:47 Does this really have a different effect than the
eyaich1 2016/09/22 13:24:50 Yes, the caller (the swarming api) is simply defin
Ken Russell (switch to Gerrit) 2016/09/22 14:27:04 OK, thanks. Re-checking the recipe code I see I wa
52 57
53 xvfb_proc = None 58 xvfb_proc = None
54 openbox_proc = None 59 openbox_proc = None
55 xcompmgr_proc = None 60 xcompmgr_proc = None
56 env = os.environ.copy() 61 env = os.environ.copy()
57 # Assume we want to set up the sandbox environment variables all the 62 # Assume we want to set up the sandbox environment variables all the
58 # time; doing so is harmless on non-Linux platforms and is needed 63 # time; doing so is harmless on non-Linux platforms and is needed
59 # all the time on Linux. 64 # all the time on Linux.
60 env[CHROME_SANDBOX_ENV] = CHROME_SANDBOX_PATH 65 env[CHROME_SANDBOX_ENV] = CHROME_SANDBOX_PATH
61 if args.xvfb and xvfb.should_start_xvfb(env): 66 if args.xvfb and xvfb.should_start_xvfb(env):
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 117
113 if __name__ == '__main__': 118 if __name__ == '__main__':
114 # Conform minimally to the protocol defined by ScriptTest. 119 # Conform minimally to the protocol defined by ScriptTest.
115 if 'compile_targets' in sys.argv: 120 if 'compile_targets' in sys.argv:
116 funcs = { 121 funcs = {
117 'run': None, 122 'run': None,
118 'compile_targets': main_compile_targets, 123 'compile_targets': main_compile_targets,
119 } 124 }
120 sys.exit(common.run_script(sys.argv[1:], funcs)) 125 sys.exit(common.run_script(sys.argv[1:], funcs))
121 sys.exit(main()) 126 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