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

Side by Side Diff: build/toolchain/mac/compile_xcassets.py

Issue 2928623002: Work around Xcode 9 debug actool message. (Closed)
Patch Set: Created 3 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
« 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 # Copyright 2016 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import argparse 5 import argparse
6 import os 6 import os
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 9
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if process.returncode: 48 if process.returncode:
49 sys.stderr.write(stdout) 49 sys.stderr.write(stdout)
50 sys.exit(process.returncode) 50 sys.exit(process.returncode)
51 51
52 # In case of success, the output looks like the following: 52 # In case of success, the output looks like the following:
53 # /* com.apple.actool.compilation-results */ 53 # /* com.apple.actool.compilation-results */
54 # /Full/Path/To/Bundle.app/Assets.car 54 # /Full/Path/To/Bundle.app/Assets.car
55 # 55 #
56 # Ignore any lines in the output matching those (last line is an empty line) 56 # Ignore any lines in the output matching those (last line is an empty line)
57 # and consider that the build failed if the output contains any other lines. 57 # and consider that the build failed if the output contains any other lines.
58 #
59 # crbug.com/730054 Xcode 9's beta introduced a CoreUI(DEBUG) message followed
60 # by a detail message that can be ignored. Presumably this will be removed
61 # once Xcode 9 GMs.
62 skip_next = False
58 for line in stdout.splitlines(): 63 for line in stdout.splitlines():
64 if skip_next:
65 skip_next = False
sdefresne 2017/06/06 16:49:02 It looks like the next line is 2017-06-06 10:42:2
justincohen 2017/06/06 17:26:00 Are you sure we want to do this? I have no idea i
rohitrao (ping after 24h) 2017/06/06 18:09:46 I'd like to scope this as tightly to the actual er
justincohen 2017/06/06 20:03:04 Done.
66 continue
59 if not line: 67 if not line:
60 continue 68 continue
61 if line == '/* com.apple.actool.compilation-results */': 69 if line == '/* com.apple.actool.compilation-results */':
62 continue 70 continue
63 if line == os.path.abspath(output): 71 if line == os.path.abspath(output):
64 continue 72 continue
73 if line.startswith('CoreUI(DEBUG)'):
74 skip_next = True
75 continue
76 print line
sdefresne 2017/06/06 16:49:02 I think this "print line" is debug and need to be
justincohen 2017/06/06 17:26:00 oops, thanks!
65 sys.stderr.write(stdout) 77 sys.stderr.write(stdout)
66 sys.exit(1) 78 sys.exit(1)
67 79
68 80
69 def Main(): 81 def Main():
70 parser = argparse.ArgumentParser( 82 parser = argparse.ArgumentParser(
71 description='compile assets catalog for a bundle') 83 description='compile assets catalog for a bundle')
72 parser.add_argument( 84 parser.add_argument(
73 '--platform', '-p', required=True, 85 '--platform', '-p', required=True,
74 choices=('macosx', 'iphoneos', 'iphonesimulator'), 86 choices=('macosx', 'iphoneos', 'iphonesimulator'),
(...skipping 21 matching lines...) Expand all
96 CompileXCAssets( 108 CompileXCAssets(
97 args.output, 109 args.output,
98 args.platform, 110 args.platform,
99 args.product_type, 111 args.product_type,
100 args.minimum_deployment_target, 112 args.minimum_deployment_target,
101 args.inputs) 113 args.inputs)
102 114
103 115
104 if __name__ == '__main__': 116 if __name__ == '__main__':
105 sys.exit(Main()) 117 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