@@ -117,26 +117,30 @@ def dump_module_api((cmd, extra_dump_args, output_dir, module, quiet)):
117
117
return
118
118
119
119
def pretty_sdk_name (sdk ):
120
- if sdk .find ("macosx" ) == 0 : return 'OSX'
121
- if sdk .find ("iphoneos" ) == 0 : return 'iOS'
122
- if sdk .find ("watchos" ) == 0 : return 'watchOS'
123
- if sdk .find ("appletvos" ) == 0 : return 'tvOS'
120
+ if sdk .find ("macosx" ) == 0 :
121
+ return 'OSX'
122
+ if sdk .find ("iphoneos" ) == 0 :
123
+ return 'iOS'
124
+ if sdk .find ("watchos" ) == 0 :
125
+ return 'watchOS'
126
+ if sdk .find ("appletvos" ) == 0 :
127
+ return 'tvOS'
124
128
return 'unknownOS'
125
129
126
- # Collect the set of frameworks we should dump
130
+ # Collect the set of frameworks we should dump
127
131
def collect_frameworks (sdk ):
128
132
(exitcode , sdk_path , err ) = run_command (["xcrun" , "--show-sdk-path" , "-sdk" , sdk ])
129
133
if exitcode != 0 :
130
134
print ('error: framework collection failed with error %d' % (exitcode ))
131
135
return ()
132
136
sdk_path = sdk_path .rstrip ()
133
-
137
+
134
138
(exitcode , sdk_version , err ) = run_command (["xcrun" , "--show-sdk-version" , "-sdk" , sdk ])
135
139
if exitcode != 0 :
136
140
print ('error: framework collection failed with error %d' % (exitcode ))
137
141
return ()
138
142
sdk_version = sdk_version .rstrip ()
139
-
143
+
140
144
print ('Collecting frameworks from %s %s at %s' % (pretty_sdk_name (sdk ), sdk_version , sdk_path ))
141
145
142
146
# Collect all of the framework names
@@ -147,7 +151,7 @@ def collect_frameworks(sdk):
147
151
match = framework_matcher .match (entry )
148
152
if match :
149
153
framework = match .group (1 )
150
- if not framework in SKIPPED_FRAMEWORKS :
154
+ if framework not in SKIPPED_FRAMEWORKS :
151
155
frameworks .add (framework )
152
156
153
157
return (sorted (list (frameworks )), sdk_path )
@@ -201,7 +205,7 @@ def main():
201
205
# Execute the API dumps
202
206
pool = multiprocessing .Pool (processes = args .jobs )
203
207
pool .map (dump_module_api , jobs )
204
-
208
+
205
209
# Remove the .swift file we fed into swift-ide-test
206
210
subprocess .call (['rm' , '-f' , source_filename ])
207
211
0 commit comments