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

Side by Side Diff: testing/xvfb.py

Issue 10911014: Enable Chrome Sandbox with run_test_cases.py (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Changing test_env Created 8 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
« testing/test_env.py ('K') | « testing/test_env.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
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 the test with xvfb on linux. Runs the test normally on other platforms. 6 """Runs the test with xvfb on linux. Runs the test normally on other platforms.
7 7
8 For simplicity in gyp targets, this script just runs the test normal on 8 For simplicity in gyp targets, this script just runs the test normal on
9 non-linux platforms. 9 non-linux platforms.
10 """ 10 """
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return 3 106 return 3
107 # Inhibit recursion. 107 # Inhibit recursion.
108 env['_CHROMIUM_INSIDE_XVFB'] = '1' 108 env['_CHROMIUM_INSIDE_XVFB'] = '1'
109 # Some ChromeOS tests need a window manager. Technically, it could be 109 # Some ChromeOS tests need a window manager. Technically, it could be
110 # another script but that would be overkill. 110 # another script but that would be overkill.
111 try: 111 try:
112 ice_cmd = ['icewm'] 112 ice_cmd = ['icewm']
113 subprocess.Popen( 113 subprocess.Popen(
114 ice_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env) 114 ice_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
115 except OSError: 115 except OSError:
116 print >> sys.stderr, 'Failed to run %s' % ' '.join(cmd) 116 print >> sys.stderr, 'Failed to run %s' % ' '.join(ice_cmd)
M-A Ruel 2012/08/30 19:43:17 Argh. Thanks!
csharp 2012/08/30 20:17:48 No problem, I think I was the one who introduced t
117 return 1 117 return 1
118 return test_env.run_executable(cmd, env) 118 return test_env.run_executable(cmd, env)
119 finally: 119 finally:
120 if pid: 120 if pid:
121 kill(pid) 121 kill(pid)
122 122
123 123
124 def main(): 124 def main():
125 if len(sys.argv) < 3: 125 if len(sys.argv) < 3:
126 print >> sys.stderr, ( 126 print >> sys.stderr, (
127 'Usage: xvfb.py [path to build_dir] [command args...]') 127 'Usage: xvfb.py [path to build_dir] [command args...]')
128 return 2 128 return 2
129 return run_executable(sys.argv[2:], sys.argv[1], os.environ.copy()) 129 return run_executable(sys.argv[2:], sys.argv[1], os.environ.copy())
130 130
131 131
132 if __name__ == "__main__": 132 if __name__ == "__main__":
133 sys.exit(main()) 133 sys.exit(main())
OLDNEW
« testing/test_env.py ('K') | « testing/test_env.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698