@@ -133,26 +133,30 @@ def dump_module_api((cmd, extra_dump_args, output_dir, module, quiet, verbose)):
133
133
return
134
134
135
135
def pretty_sdk_name (sdk ):
136
- if sdk .find ("macosx" ) == 0 : return 'OSX'
137
- if sdk .find ("iphoneos" ) == 0 : return 'iOS'
138
- if sdk .find ("watchos" ) == 0 : return 'watchOS'
139
- if sdk .find ("appletvos" ) == 0 : return 'tvOS'
136
+ if sdk .find ("macosx" ) == 0 :
137
+ return 'OSX'
138
+ if sdk .find ("iphoneos" ) == 0 :
139
+ return 'iOS'
140
+ if sdk .find ("watchos" ) == 0 :
141
+ return 'watchOS'
142
+ if sdk .find ("appletvos" ) == 0 :
143
+ return 'tvOS'
140
144
return 'unknownOS'
141
145
142
- # Collect the set of frameworks we should dump
146
+ # Collect the set of frameworks we should dump
143
147
def collect_frameworks (sdk ):
144
148
(exitcode , sdk_path , err ) = run_command (["xcrun" , "--show-sdk-path" , "-sdk" , sdk ])
145
149
if exitcode != 0 :
146
150
print ('error: framework collection failed with error %d' % (exitcode ))
147
151
return ()
148
152
sdk_path = sdk_path .rstrip ()
149
-
153
+
150
154
(exitcode , sdk_version , err ) = run_command (["xcrun" , "--show-sdk-version" , "-sdk" , sdk ])
151
155
if exitcode != 0 :
152
156
print ('error: framework collection failed with error %d' % (exitcode ))
153
157
return ()
154
158
sdk_version = sdk_version .rstrip ()
155
-
159
+
156
160
print ('Collecting frameworks from %s %s at %s' % (pretty_sdk_name (sdk ), sdk_version , sdk_path ))
157
161
158
162
# Collect all of the framework names
@@ -163,7 +167,7 @@ def collect_frameworks(sdk):
163
167
match = framework_matcher .match (entry )
164
168
if match :
165
169
framework = match .group (1 )
166
- if not framework in SKIPPED_FRAMEWORKS :
170
+ if framework not in SKIPPED_FRAMEWORKS :
167
171
frameworks .add (framework )
168
172
169
173
return (sorted (list (frameworks )), sdk_path )
@@ -217,7 +221,7 @@ def main():
217
221
# Execute the API dumps
218
222
pool = multiprocessing .Pool (processes = args .jobs )
219
223
pool .map (dump_module_api , jobs )
220
-
224
+
221
225
# Remove the .swift file we fed into swift-ide-test
222
226
subprocess .call (['rm' , '-f' , source_filename ])
223
227
0 commit comments