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

Side by Side Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 1639623002: win_toolchain: Ignore ReportQueue entries in calculating toolchain hash (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: typo Created 4 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 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 """Downloads and unpacks a toolchain for building on Windows. The contents are 6 """Downloads and unpacks a toolchain for building on Windows. The contents are
7 matched by sha1 which will be updated when the toolchain is updated. 7 matched by sha1 which will be updated when the toolchain is updated.
8 8
9 Having a toolchain script in depot_tools means that it's not versioned 9 Having a toolchain script in depot_tools means that it's not versioned
10 directly with the source code. That is, if the toolchain is upgraded, but 10 directly with the source code. That is, if the toolchain is upgraded, but
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 pass 67 pass
68 68
69 69
70 def GetFileList(root): 70 def GetFileList(root):
71 """Gets a normalized list of files under |root|.""" 71 """Gets a normalized list of files under |root|."""
72 assert not os.path.isabs(root) 72 assert not os.path.isabs(root)
73 assert os.path.normpath(root) == root 73 assert os.path.normpath(root) == root
74 file_list = [] 74 file_list = []
75 for base, _, files in os.walk(root): 75 for base, _, files in os.walk(root):
76 paths = [os.path.join(base, f) for f in files] 76 paths = [os.path.join(base, f) for f in files]
77 file_list.extend(x.lower() for x in paths) 77 # Ignore WER ReportQueue entries that vctip/cl leave in the bin dir if/when
78 # they crash.
79 file_list.extend(x.lower() for x in paths if 'WER\\ReportQueue' not in x)
78 return sorted(file_list, key=lambda s: s.replace('/', '\\')) 80 return sorted(file_list, key=lambda s: s.replace('/', '\\'))
79 81
80 82
81 def MakeTimestampsFileName(root): 83 def MakeTimestampsFileName(root):
82 return os.path.join(root, '..', '.timestamps') 84 return os.path.join(root, '..', '.timestamps')
83 85
84 86
85 def CalculateHash(root): 87 def CalculateHash(root):
86 """Calculates the sha1 of the paths to all files in the given |root| and the 88 """Calculates the sha1 of the paths to all files in the given |root| and the
87 contents of those files, and returns as a hex string.""" 89 contents of those files, and returns as a hex string."""
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 options.output_json) 426 options.output_json)
425 427
426 if os.environ.get('GYP_MSVS_VERSION') == '2015': 428 if os.environ.get('GYP_MSVS_VERSION') == '2015':
427 InstallUniversalCRTIfNeeded(abs_target_dir) 429 InstallUniversalCRTIfNeeded(abs_target_dir)
428 430
429 return 0 431 return 0
430 432
431 433
432 if __name__ == '__main__': 434 if __name__ == '__main__':
433 sys.exit(main()) 435 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