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

Side by Side Diff: tools/isolate/isolate.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 | « 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 """Does one of the following depending on the --mode argument: 6 """Does one of the following depending on the --mode argument:
7 check Verifies all the inputs exist, touches the file specified with 7 check Verifies all the inputs exist, touches the file specified with
8 --result and exits. 8 --result and exits.
9 hashtable Puts a manifest file and hard links each of the inputs into the 9 hashtable Puts a manifest file and hard links each of the inputs into the
10 output directory. 10 output directory.
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 # Processes the variables and update the saved state. 415 # Processes the variables and update the saved state.
416 variables = process_variables(variables, relative_base_dir, error) 416 variables = process_variables(variables, relative_base_dir, error)
417 self.saved_state.update(isolate_file, variables) 417 self.saved_state.update(isolate_file, variables)
418 418
419 with open(isolate_file, 'r') as f: 419 with open(isolate_file, 'r') as f:
420 # At that point, variables are not replaced yet in command and infiles. 420 # At that point, variables are not replaced yet in command and infiles.
421 # infiles may contain directory entries and is in posix style. 421 # infiles may contain directory entries and is in posix style.
422 command, infiles, read_only = load_isolate(f.read(), error) 422 command, infiles, read_only = load_isolate(f.read(), error)
423 command = [eval_variables(i, variables) for i in command] 423 command = [eval_variables(i, variables) for i in command]
424 infiles = [eval_variables(f, variables) for f in infiles] 424 infiles = [eval_variables(f, variables) for f in infiles]
425
426 # Command paths could contain / or \ on windows. Always normalize
427 # to os.path.sep.
428 command = [i.replace('/', os.path.sep) for i in command]
M-A Ruel 2012/05/23 00:34:09 It'll blow up. What is the problem exactly? (And
429
425 # root_dir is automatically determined by the deepest root accessed with the 430 # root_dir is automatically determined by the deepest root accessed with the
426 # form '../../foo/bar'. 431 # form '../../foo/bar'.
427 root_dir = determine_root_dir(relative_base_dir, infiles) 432 root_dir = determine_root_dir(relative_base_dir, infiles)
428 # The relative directory is automatically determined by the relative path 433 # The relative directory is automatically determined by the relative path
429 # between root_dir and the directory containing the .isolate file, 434 # between root_dir and the directory containing the .isolate file,
430 # isolate_base_dir. 435 # isolate_base_dir.
431 relative_cwd = os.path.relpath(relative_base_dir, root_dir) 436 relative_cwd = os.path.relpath(relative_base_dir, root_dir)
432 # Normalize the files based to root_dir. It is important to keep the 437 # Normalize the files based to root_dir. It is important to keep the
433 # trailing os.path.sep at that step. 438 # trailing os.path.sep at that step.
434 infiles = [ 439 infiles = [
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 result_file, 753 result_file,
749 input_file, 754 input_file,
750 options.mode, 755 options.mode,
751 variables, 756 variables,
752 out_dir, 757 out_dir,
753 parser.error) 758 parser.error)
754 759
755 760
756 if __name__ == '__main__': 761 if __name__ == '__main__':
757 sys.exit(main()) 762 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