@@ -136,6 +136,8 @@ def __init__(self, host_target, args):
136
136
suffix = "-only_non_executable"
137
137
elif args .only_executable_test :
138
138
suffix = "-only_executable"
139
+ elif args .only_non_executable_test :
140
+ suffix = "-only_non_executable"
139
141
else :
140
142
suffix = ""
141
143
subset_suffix = ""
@@ -214,25 +216,25 @@ def __platforms_to_skip_test(self, args):
214
216
platforms_to_skip_test .add (StdlibDeploymentTarget .Cygwin )
215
217
if not args .test_osx :
216
218
platforms_to_skip_test .add (StdlibDeploymentTarget .OSX )
217
- if not args .test_ios_host :
219
+ if not args .test_ios_host and not args . only_non_executable_test :
218
220
platforms_to_skip_test .add (StdlibDeploymentTarget .iOS )
219
- else :
221
+ elif not args . only_non_executable_test :
220
222
raise ArgumentError (None ,
221
223
"error: iOS device tests are not " +
222
224
"supported in open-source Swift." )
223
225
if not args .test_ios_simulator :
224
226
platforms_to_skip_test .add (StdlibDeploymentTarget .iOSSimulator )
225
- if not args .test_tvos_host :
227
+ if not args .test_tvos_host and not args . only_non_executable_test :
226
228
platforms_to_skip_test .add (StdlibDeploymentTarget .AppleTV )
227
- else :
229
+ elif not args . only_non_executable_test :
228
230
raise ArgumentError (None ,
229
231
"error: tvOS device tests are not " +
230
232
"supported in open-source Swift." )
231
233
if not args .test_tvos_simulator :
232
234
platforms_to_skip_test .add (StdlibDeploymentTarget .AppleTVSimulator )
233
- if not args .test_watchos_host :
235
+ if not args .test_watchos_host and not args . only_non_executable_test :
234
236
platforms_to_skip_test .add (StdlibDeploymentTarget .AppleWatch )
235
- else :
237
+ elif not args . only_non_executable_test :
236
238
raise ArgumentError (None ,
237
239
"error: watchOS device tests are not " +
238
240
"supported in open-source Swift." )
@@ -255,10 +257,10 @@ def __platforms_to_skip_test_host(self, args):
255
257
platforms_to_skip_test_host = set ()
256
258
if not args .test_android_host :
257
259
platforms_to_skip_test_host .add (StdlibDeploymentTarget .Android )
258
- if not args .test_ios_host :
260
+ if not args .test_ios_host and not args . only_non_executable_test :
259
261
platforms_to_skip_test_host .add (StdlibDeploymentTarget .iOS )
260
- if not args .test_tvos_host :
262
+ if not args .test_tvos_host and not args . only_non_executable_test :
261
263
platforms_to_skip_test_host .add (StdlibDeploymentTarget .AppleTV )
262
- if not args .test_watchos_host :
264
+ if not args .test_watchos_host and not args . only_non_executable_test :
263
265
platforms_to_skip_test_host .add (StdlibDeploymentTarget .AppleWatch )
264
266
return platforms_to_skip_test_host
0 commit comments