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

Side by Side Diff: tools/test-wrapper-gypbuild.py

Issue 10447031: Add explicit "python" to subprocess args in test wrapper script (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« 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 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 parser.print_help() 217 parser.print_help()
218 return 1 218 return 1
219 219
220 workspace = abspath(join(dirname(sys.argv[0]), '..')) 220 workspace = abspath(join(dirname(sys.argv[0]), '..'))
221 returncodes = 0 221 returncodes = 0
222 222
223 if not options.no_presubmit: 223 if not options.no_presubmit:
224 print ">>> running presubmit tests" 224 print ">>> running presubmit tests"
225 returncodes += subprocess.call([workspace + '/tools/presubmit.py']) 225 returncodes += subprocess.call([workspace + '/tools/presubmit.py'])
226 226
227 args_for_children = [workspace + '/tools/test.py'] + PassOnOptions(options) 227 args_for_children = ['python']
228 args_for_children += [workspace + '/tools/test.py'] + PassOnOptions(options)
228 args_for_children += ['--no-build', '--build-system=gyp'] 229 args_for_children += ['--no-build', '--build-system=gyp']
229 for arg in args: 230 for arg in args:
230 args_for_children += [arg] 231 args_for_children += [arg]
231 env = os.environ 232 env = os.environ
232 233
233 for mode in options.mode: 234 for mode in options.mode:
234 for arch in options.arch: 235 for arch in options.arch:
235 print ">>> running tests for %s.%s" % (arch, mode) 236 print ">>> running tests for %s.%s" % (arch, mode)
236 if options.buildbot: 237 if options.buildbot:
237 shellpath = workspace + '/' + options.outdir + '/' + mode 238 shellpath = workspace + '/' + options.outdir + '/' + mode
238 mode = mode.lower() 239 mode = mode.lower()
239 else: 240 else:
240 shellpath = workspace + '/' + options.outdir + '/' + arch + '.' + mode 241 shellpath = workspace + '/' + options.outdir + '/' + arch + '.' + mode
241 env['LD_LIBRARY_PATH'] = shellpath + '/lib.target' 242 env['LD_LIBRARY_PATH'] = shellpath + '/lib.target'
242 shell = shellpath + "/d8" 243 shell = shellpath + "/d8"
243 child = subprocess.Popen(' '.join(args_for_children + 244 cmdline = ' '.join(args_for_children +
244 ['--arch=' + arch] + 245 ['--arch=' + arch] +
245 ['--mode=' + mode] + 246 ['--mode=' + mode] +
246 ['--shell=' + shell]), 247 ['--shell=' + shell])
248 # TODO(jkummerow): This print is temporary.
249 print "Executing: %s" % cmdline
250
251 child = subprocess.Popen(cmdline,
247 shell=True, 252 shell=True,
248 cwd=workspace, 253 cwd=workspace,
249 env=env) 254 env=env)
250 returncodes += child.wait() 255 returncodes += child.wait()
251 256
252 if len(options.mode) == 0 and len(options.arch) == 0: 257 if len(options.mode) == 0 and len(options.arch) == 0:
253 print ">>> running tests" 258 print ">>> running tests"
254 shellpath = workspace + '/' + options.outdir 259 shellpath = workspace + '/' + options.outdir
255 env['LD_LIBRARY_PATH'] = shellpath + '/lib.target' 260 env['LD_LIBRARY_PATH'] = shellpath + '/lib.target'
256 shell = shellpath + '/d8' 261 shell = shellpath + '/d8'
257 child = subprocess.Popen(' '.join(args_for_children + 262 child = subprocess.Popen(' '.join(args_for_children +
258 ['--shell=' + shell]), 263 ['--shell=' + shell]),
259 shell=True, 264 shell=True,
260 cwd=workspace, 265 cwd=workspace,
261 env=env) 266 env=env)
262 returncodes = child.wait() 267 returncodes = child.wait()
263 268
264 return returncodes 269 return returncodes
265 270
266 271
267 if __name__ == '__main__': 272 if __name__ == '__main__':
268 sys.exit(Main()) 273 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