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

Side by Side Diff: tools/isolate/run_test_from_archive.py

Issue 10413055: Adjust Commands Paths for Result File on Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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 | « 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 """Reads a manifest, creates a tree of hardlinks and runs the test. 6 """Reads a manifest, creates a tree of hardlinks and runs the test.
7 7
8 Keeps a local cache. 8 Keeps a local cache.
9 """ 9 """
10 10
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 if 'mode' in properties: 258 if 'mode' in properties:
259 # It's not set on Windows. 259 # It's not set on Windows.
260 os.chmod(outfile, properties['mode']) 260 os.chmod(outfile, properties['mode'])
261 261
262 cwd = os.path.join(outdir, manifest['relative_cwd']) 262 cwd = os.path.join(outdir, manifest['relative_cwd'])
263 if not os.path.isdir(cwd): 263 if not os.path.isdir(cwd):
264 os.makedirs(cwd) 264 os.makedirs(cwd)
265 if manifest.get('read_only'): 265 if manifest.get('read_only'):
266 make_writable(outdir, True) 266 make_writable(outdir, True)
267 cmd = manifest['command'] 267 cmd = manifest['command']
268 # Ensure paths are correctly separated on windows.
269 cmd[0] = cmd[0].replace('/', os.path.sep)
268 logging.info('Running %s, cwd=%s' % (cmd, cwd)) 270 logging.info('Running %s, cwd=%s' % (cmd, cwd))
269 return subprocess.call(cmd, cwd=cwd) 271 return subprocess.call(cmd, cwd=cwd)
270 finally: 272 finally:
271 # Save first, in case an exception occur in the following lines, then clean 273 # Save first, in case an exception occur in the following lines, then clean
272 # up. 274 # up.
273 cache.save() 275 cache.save()
274 rmtree(outdir) 276 rmtree(outdir)
275 cache.trim() 277 cache.trim()
276 278
277 279
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 parser.error('Unsupported args %s' % ' '.join(args)) 322 parser.error('Unsupported args %s' % ' '.join(args))
321 323
322 manifest = json.load(open_remote(options.manifest)) 324 manifest = json.load(open_remote(options.manifest))
323 return run_tha_test( 325 return run_tha_test(
324 manifest, os.path.abspath(options.cache), options.remote, 326 manifest, os.path.abspath(options.cache), options.remote,
325 options.max_cache_size, options.min_free_space) 327 options.max_cache_size, options.min_free_space)
326 328
327 329
328 if __name__ == '__main__': 330 if __name__ == '__main__':
329 sys.exit(main()) 331 sys.exit(main())
OLDNEW
« no previous file with comments | « testing/test_env.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698