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

Side by Side Diff: chrome/tools/build/mac/archive_symbols.py

Issue 2054893002: [Mac/GN] Add targets to run dump_syms and create the dSYM archive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« chrome/BUILD.gn ('K') | « chrome/BUILD.gn ('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
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import os
6 import subprocess
7 import sys
8
9 # This script creates a BZ2-compressed TAR file for archiving Chrome symbols.
10
11 def Main(args):
12 if len(args) < 3:
13 print >> sys.stderr, "Usage: python archive_symbols.py file.tar.bz2 file..."
14 return 1
15
16 _RemoveIfExists(args[1])
17
18 try:
19 return subprocess.check_call(['tar', '-cjf'] + args[1:])
20 except:
21 _RemoveIfExists(args[1])
22 raise
23
24
25 def _RemoveIfExists(path):
26 if os.path.exists(path):
Mark Mentovai 2016/06/09 18:48:04 try-catch swallowing OSError ENOENT might be more
Robert Sesek 2016/06/09 20:53:46 Ack, but will keep since this pattern is in a few
27 os.unlink(path)
28
29
30 if __name__ == '__main__':
31 sys.exit(Main(sys.argv))
Mark Mentovai 2016/06/09 18:48:04 I like to call main with sys.argv[1:] (especially
Robert Sesek 2016/06/09 20:53:46 Done.
OLDNEW
« chrome/BUILD.gn ('K') | « chrome/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698