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

Side by Side Diff: testing/test_env.py

Issue 882913004: test_env.py: Disable sandbox on clang/win for now. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: indent Created 5 years, 10 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 (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 """Sets environment variables needed to run a chromium unit test.""" 6 """Sets environment variables needed to run a chromium unit test."""
7 7
8 import os 8 import os
9 import stat 9 import stat
10 import subprocess 10 import subprocess
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 # logic is used. 119 # logic is used.
120 env.pop('CR_SOURCE_ROOT', None) 120 env.pop('CR_SOURCE_ROOT', None)
121 extra_env.update(get_sandbox_env(env)) 121 extra_env.update(get_sandbox_env(env))
122 122
123 # Copy logic from tools/build/scripts/slave/runtest.py. 123 # Copy logic from tools/build/scripts/slave/runtest.py.
124 asan = '--asan=1' in cmd 124 asan = '--asan=1' in cmd
125 lsan = '--lsan=1' in cmd 125 lsan = '--lsan=1' in cmd
126 126
127 if asan: 127 if asan:
128 extra_env.update(get_asan_env(cmd, lsan)) 128 extra_env.update(get_asan_env(cmd, lsan))
129 # ASan is not yet sandbox-friendly on Windows (http://crbug.com/382867).
130 if sys.platform == 'win32':
131 cmd.append('--no-sandbox')
129 if lsan: 132 if lsan:
130 cmd.append('--no-sandbox') 133 cmd.append('--no-sandbox')
131 134
132 cmd = trim_cmd(cmd) 135 cmd = trim_cmd(cmd)
133 136
134 # Ensure paths are correctly separated on windows. 137 # Ensure paths are correctly separated on windows.
135 cmd[0] = cmd[0].replace('/', os.path.sep) 138 cmd[0] = cmd[0].replace('/', os.path.sep)
136 cmd = fix_python_path(cmd) 139 cmd = fix_python_path(cmd)
137 140
138 print('Additional test environment:\n%s\n' 141 print('Additional test environment:\n%s\n'
(...skipping 21 matching lines...) Expand all
160 print >> sys.stderr, 'Failed to start %s' % cmd 163 print >> sys.stderr, 'Failed to start %s' % cmd
161 raise 164 raise
162 165
163 166
164 def main(): 167 def main():
165 return run_executable(sys.argv[1:], os.environ.copy()) 168 return run_executable(sys.argv[1:], os.environ.copy())
166 169
167 170
168 if __name__ == '__main__': 171 if __name__ == '__main__':
169 sys.exit(main()) 172 sys.exit(main())
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