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

Side by Side Diff: build/get_syzygy_binaries.py

Issue 670183003: Update from chromium 62675d9fb31fb8cedc40f68e78e8445a74f362e7 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « build/get_landmines.py ('k') | build/install-build-deps.sh » ('j') | 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 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 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 """A utility script for downloading versioned Syzygy binaries.""" 6 """A utility script for downloading versioned Syzygy binaries."""
7 7
8 import cStringIO 8 import cStringIO
9 import hashlib 9 import hashlib
10 import errno 10 import errno
(...skipping 28 matching lines...) Expand all
39 # This matches an MD5 hash. 39 # This matches an MD5 hash.
40 _MD5_RE = re.compile('^[a-f0-9]{32}$') 40 _MD5_RE = re.compile('^[a-f0-9]{32}$')
41 41
42 # List of reources to be downloaded and installed. These are tuples with the 42 # List of reources to be downloaded and installed. These are tuples with the
43 # following format: 43 # following format:
44 # (basename, logging name, relative installation path, extraction filter) 44 # (basename, logging name, relative installation path, extraction filter)
45 _RESOURCES = [ 45 _RESOURCES = [
46 ('benchmark.zip', 'benchmark', '', None), 46 ('benchmark.zip', 'benchmark', '', None),
47 ('binaries.zip', 'binaries', 'exe', None), 47 ('binaries.zip', 'binaries', 'exe', None),
48 ('symbols.zip', 'symbols', 'exe', 48 ('symbols.zip', 'symbols', 'exe',
49 lambda x: x.filename.endswith('.dll.pdb')), 49 lambda x: x.filename.endswith('.dll.pdb'))]
50 ('include.zip', 'include', 'include', None),
51 ('lib.zip', 'library', 'lib', None)]
52 50
53 51
54 def _Shell(*cmd, **kw): 52 def _Shell(*cmd, **kw):
55 """Runs |cmd|, returns the results from Popen(cmd).communicate().""" 53 """Runs |cmd|, returns the results from Popen(cmd).communicate()."""
56 _LOGGER.debug('Executing %s.', cmd) 54 _LOGGER.debug('Executing %s.', cmd)
57 prog = subprocess.Popen(cmd, shell=True, **kw) 55 prog = subprocess.Popen(cmd, shell=True, **kw)
58 56
59 stdout, stderr = prog.communicate() 57 stdout, stderr = prog.communicate()
60 if prog.returncode != 0: 58 if prog.returncode != 0:
61 raise RuntimeError('Command "%s" returned %d.' % (cmd, prog.returncode)) 59 raise RuntimeError('Command "%s" returned %d.' % (cmd, prog.returncode))
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 # Install the new binaries. In a dry-run this will actually download the 435 # Install the new binaries. In a dry-run this will actually download the
438 # archives, but it won't write anything to disk. 436 # archives, but it won't write anything to disk.
439 state = _InstallBinaries(options, deleted) 437 state = _InstallBinaries(options, deleted)
440 438
441 # Build and save the state for the directory. 439 # Build and save the state for the directory.
442 _SaveState(options.output_dir, state, options.dry_run) 440 _SaveState(options.output_dir, state, options.dry_run)
443 441
444 442
445 if __name__ == '__main__': 443 if __name__ == '__main__':
446 main() 444 main()
OLDNEW
« no previous file with comments | « build/get_landmines.py ('k') | build/install-build-deps.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698