Skip to content

Commit a14524e

Browse files
authored
Revert erroneous renaming of test_*_host destinations to test_*_device. (#12127)
1 parent c7b9307 commit a14524e

File tree

4 files changed

+46
-46
lines changed

4 files changed

+46
-46
lines changed

utils/build-script

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class BuildScriptInvocation(object):
315315
self.platforms_to_skip_test.add(StdlibDeploymentTarget.Cygwin)
316316
if not args.test_osx:
317317
self.platforms_to_skip_test.add(StdlibDeploymentTarget.OSX)
318-
if not args.test_ios_device:
318+
if not args.test_ios_host:
319319
self.platforms_to_skip_test.add(StdlibDeploymentTarget.iOS)
320320
else:
321321
exit_rejecting_arguments("error: iOS device tests are not " +
@@ -326,15 +326,15 @@ class BuildScriptInvocation(object):
326326
if not args.test_ios_32bit_simulator:
327327
self.platforms_archs_to_skip_test.add(
328328
StdlibDeploymentTarget.iOSSimulator.i386)
329-
if not args.test_tvos_device:
329+
if not args.test_tvos_host:
330330
self.platforms_to_skip_test.add(StdlibDeploymentTarget.AppleTV)
331331
else:
332332
exit_rejecting_arguments("error: tvOS device tests are not " +
333333
"supported in open-source Swift.")
334334
if not args.test_tvos_simulator:
335335
self.platforms_to_skip_test.add(
336336
StdlibDeploymentTarget.AppleTVSimulator)
337-
if not args.test_watchos_device:
337+
if not args.test_watchos_host:
338338
self.platforms_to_skip_test.add(StdlibDeploymentTarget.AppleWatch)
339339
else:
340340
exit_rejecting_arguments("error: watchOS device tests are not " +
@@ -343,16 +343,16 @@ class BuildScriptInvocation(object):
343343
self.platforms_to_skip_test.add(
344344
StdlibDeploymentTarget.AppleWatchSimulator)
345345

346-
if not args.test_android_device:
346+
if not args.test_android_host:
347347
self.platforms_to_skip_test.add(StdlibDeploymentTarget.Android)
348348

349349
self.platforms_to_skip_test_host = set()
350-
if not args.test_ios_device:
350+
if not args.test_ios_host:
351351
self.platforms_to_skip_test_host.add(StdlibDeploymentTarget.iOS)
352-
if not args.test_tvos_device:
352+
if not args.test_tvos_host:
353353
self.platforms_to_skip_test_host.add(
354354
StdlibDeploymentTarget.AppleTV)
355-
if not args.test_watchos_device:
355+
if not args.test_watchos_host:
356356
self.platforms_to_skip_test_host.add(
357357
StdlibDeploymentTarget.AppleWatch)
358358

@@ -593,21 +593,21 @@ class BuildScriptInvocation(object):
593593
impl_args += ["--skip-test-cygwin"]
594594
if not args.test_osx:
595595
impl_args += ["--skip-test-osx"]
596-
if not args.test_ios_device:
596+
if not args.test_ios_host:
597597
impl_args += ["--skip-test-ios-host"]
598598
if not args.test_ios_simulator:
599599
impl_args += ["--skip-test-ios-simulator"]
600600
if not args.test_ios_32bit_simulator:
601601
impl_args += ["--skip-test-ios-32bit-simulator"]
602-
if not args.test_tvos_device:
602+
if not args.test_tvos_host:
603603
impl_args += ["--skip-test-tvos-host"]
604604
if not args.test_tvos_simulator:
605605
impl_args += ["--skip-test-tvos-simulator"]
606-
if not args.test_watchos_device:
606+
if not args.test_watchos_host:
607607
impl_args += ["--skip-test-watchos-host"]
608608
if not args.test_watchos_simulator:
609609
impl_args += ["--skip-test-watchos-simulator"]
610-
if not args.test_android_device:
610+
if not args.test_android_host:
611611
impl_args += ["--skip-test-android-host"]
612612
if args.build_runtime_with_host_compiler:
613613
impl_args += ["--build-runtime-with-host-compiler"]

utils/build_swift/driver_arguments.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -215,43 +215,43 @@ def _apply_default_arguments(args):
215215

216216
# --skip-test-ios is merely a shorthand for host and simulator tests.
217217
if not args.test_ios:
218-
args.test_ios_device = False
218+
args.test_ios_host = False
219219
args.test_ios_simulator = False
220220
# --skip-test-tvos is merely a shorthand for host and simulator tests.
221221
if not args.test_tvos:
222-
args.test_tvos_device = False
222+
args.test_tvos_host = False
223223
args.test_tvos_simulator = False
224224
# --skip-test-watchos is merely a shorthand for host and simulator
225225
# --tests.
226226
if not args.test_watchos:
227-
args.test_watchos_device = False
227+
args.test_watchos_host = False
228228
args.test_watchos_simulator = False
229229

230230
# --skip-build-{ios,tvos,watchos}-{device,simulator} implies
231231
# --skip-test-{ios,tvos,watchos}-{host,simulator}
232232
if not args.build_ios_device:
233-
args.test_ios_device = False
233+
args.test_ios_host = False
234234
if not args.build_ios_simulator:
235235
args.test_ios_simulator = False
236236

237237
if not args.build_tvos_device:
238-
args.test_tvos_device = False
238+
args.test_tvos_host = False
239239
if not args.build_tvos_simulator:
240240
args.test_tvos_simulator = False
241241

242242
if not args.build_watchos_device:
243-
args.test_watchos_device = False
243+
args.test_watchos_host = False
244244
if not args.build_watchos_simulator:
245245
args.test_watchos_simulator = False
246246

247247
if not args.build_android:
248-
args.test_android_device = False
248+
args.test_android_host = False
249249

250250
if not args.host_test:
251-
args.test_ios_device = False
252-
args.test_tvos_device = False
253-
args.test_watchos_device = False
254-
args.test_android_device = False
251+
args.test_ios_host = False
252+
args.test_tvos_host = False
253+
args.test_watchos_host = False
254+
args.test_android_host = False
255255

256256
if args.build_subdir is None:
257257
args.build_subdir = \
@@ -798,7 +798,7 @@ def create_argument_parser():
798798
help="skip testing iOS 32 bit simulator targets")
799799
skip_test_group.add_argument(
800800
"--skip-test-ios-host",
801-
dest='test_ios_device',
801+
dest='test_ios_host',
802802
action=arguments.action.optional_false,
803803
help="skip testing iOS device targets on the host machine (the phone "
804804
"itself)")
@@ -815,7 +815,7 @@ def create_argument_parser():
815815
help="skip testing tvOS simulator targets")
816816
skip_test_group.add_argument(
817817
"--skip-test-tvos-host",
818-
dest='test_tvos_device',
818+
dest='test_tvos_host',
819819
action=arguments.action.optional_false,
820820
help="skip testing tvOS device targets on the host machine (the TV "
821821
"itself)")
@@ -832,13 +832,13 @@ def create_argument_parser():
832832
help="skip testing watchOS simulator targets")
833833
skip_test_group.add_argument(
834834
"--skip-test-watchos-host",
835-
dest='test_watchos_device',
835+
dest='test_watchos_host',
836836
action=arguments.action.optional_false,
837837
help="skip testing watchOS device targets on the host machine (the "
838838
"watch itself)")
839839
skip_test_group.add_argument(
840840
"--skip-test-android-host",
841-
dest='test_android_device',
841+
dest='test_android_host',
842842
action=arguments.action.optional_false,
843843
help="skip testing Android device targets on the host machine (the "
844844
"phone itself)")

utils/build_swift/tests/expected_options.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,23 +153,23 @@
153153
'swift_user_visible_version': '4.1',
154154
'symbols_package': None,
155155
'test': None,
156-
'test_android_device': False,
156+
'test_android_host': False,
157157
'test_cygwin': False,
158158
'test_freebsd': False,
159159
'test_ios': False,
160160
'test_ios_32bit_simulator': True,
161-
'test_ios_device': False,
161+
'test_ios_host': False,
162162
'test_ios_simulator': False,
163163
'test_linux': False,
164164
'test_optimize_for_size': None,
165165
'test_optimized': None,
166166
'test_osx': False,
167167
'test_paths': [],
168168
'test_tvos': False,
169-
'test_tvos_device': False,
169+
'test_tvos_host': False,
170170
'test_tvos_simulator': False,
171171
'test_watchos': False,
172-
'test_watchos_device': False,
172+
'test_watchos_host': False,
173173
'test_watchos_simulator': False,
174174
'tvos': False,
175175
'tvos_all': False,
@@ -393,22 +393,22 @@ class IgnoreOption(_BaseOption):
393393
dest='build_watchos_device'),
394394
ToggleOption('--skip-build-watchos-simulator',
395395
dest='build_watchos_simulator'),
396-
ToggleOption('--skip-test-android-host', dest='test_android_device'),
396+
ToggleOption('--skip-test-android-host', dest='test_android_host'),
397397
ToggleOption('--skip-test-cygwin', dest='test_cygwin'),
398398
ToggleOption('--skip-test-freebsd', dest='test_freebsd'),
399399
ToggleOption('--skip-test-ios', dest='test_ios'),
400400
ToggleOption('--skip-test-ios-32bit-simulator',
401401
dest='test_ios_32bit_simulator'),
402-
ToggleOption('--skip-test-ios-host', dest='test_ios_device'),
402+
ToggleOption('--skip-test-ios-host', dest='test_ios_host'),
403403
ToggleOption('--skip-test-ios-simulator', dest='test_ios_simulator'),
404404
ToggleOption('--skip-test-linux', dest='test_linux'),
405405
ToggleOption('--skip-test-osx', dest='test_osx'),
406406
ToggleOption('--skip-test-tvos', dest='test_tvos'),
407-
ToggleOption('--skip-test-tvos-host', dest='test_tvos_device'),
407+
ToggleOption('--skip-test-tvos-host', dest='test_tvos_host'),
408408
ToggleOption('--skip-test-tvos-simulator',
409409
dest='test_tvos_simulator'),
410410
ToggleOption('--skip-test-watchos', dest='test_watchos'),
411-
ToggleOption('--skip-test-watchos-host', dest='test_watchos_device'),
411+
ToggleOption('--skip-test-watchos-host', dest='test_watchos_host'),
412412
ToggleOption('--skip-test-watchos-simulator',
413413
dest='test_watchos_simulator'),
414414
ToggleOption('--test', dest='test'),

utils/build_swift/tests/test_driver_arguments.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def test_implied_defaults_skip_build_ios(self):
446446
self.assertFalse(args.build_ios_simulator)
447447

448448
# Also implies that the tests should be skipped
449-
self.assertFalse(args.test_ios_device)
449+
self.assertFalse(args.test_ios_host)
450450
self.assertFalse(args.test_ios_simulator)
451451

452452
def test_implied_defaults_skip_build_tvos(self):
@@ -456,7 +456,7 @@ def test_implied_defaults_skip_build_tvos(self):
456456
self.assertFalse(args.build_tvos_simulator)
457457

458458
# Also implies that the tests should be skipped
459-
self.assertFalse(args.test_tvos_device)
459+
self.assertFalse(args.test_tvos_host)
460460
self.assertFalse(args.test_tvos_simulator)
461461

462462
def test_implied_defaults_skip_build_watchos(self):
@@ -466,7 +466,7 @@ def test_implied_defaults_skip_build_watchos(self):
466466
self.assertFalse(args.build_watchos_simulator)
467467

468468
# Also implies that the tests should be skipped
469-
self.assertFalse(args.test_watchos_device)
469+
self.assertFalse(args.test_watchos_host)
470470
self.assertFalse(args.test_watchos_simulator)
471471

472472
def test_implied_defaults_validation_test(self):
@@ -503,37 +503,37 @@ def test_implied_defaults_skip_all_tests(self):
503503
def test_implied_defaults_skip_test_ios(self):
504504
with self.assertNotRaises(ParserError):
505505
args = self.parse_args(['--skip-test-ios'])
506-
self.assertFalse(args.test_ios_device)
506+
self.assertFalse(args.test_ios_host)
507507
self.assertFalse(args.test_ios_simulator)
508508

509509
def test_implied_defaults_skip_test_tvos(self):
510510
with self.assertNotRaises(ParserError):
511511
args = self.parse_args(['--skip-test-tvos'])
512-
self.assertFalse(args.test_tvos_device)
512+
self.assertFalse(args.test_tvos_host)
513513
self.assertFalse(args.test_tvos_simulator)
514514

515515
def test_implied_defaults_skip_test_watchos(self):
516516
with self.assertNotRaises(ParserError):
517517
args = self.parse_args(['--skip-test-watchos'])
518-
self.assertFalse(args.test_watchos_device)
518+
self.assertFalse(args.test_watchos_host)
519519
self.assertFalse(args.test_watchos_simulator)
520520

521521
def test_implied_defaults_skip_build_android(self):
522522
with self.assertNotRaises(ParserError):
523523
args = self.parse_args(['--android', '0'])
524-
self.assertFalse(args.test_android_device)
524+
self.assertFalse(args.test_android_host)
525525

526526
with self.assertNotRaises(ParserError):
527527
args = self.parse_args(['--skip-build-android'])
528-
self.assertFalse(args.test_android_device)
528+
self.assertFalse(args.test_android_host)
529529

530530
def test_implied_defaults_host_test(self):
531531
with self.assertNotRaises(ParserError):
532532
args = self.parse_args(['--host-test', '0'])
533-
self.assertFalse(args.test_ios_device)
534-
self.assertFalse(args.test_tvos_device)
535-
self.assertFalse(args.test_watchos_device)
536-
self.assertFalse(args.test_android_device)
533+
self.assertFalse(args.test_ios_host)
534+
self.assertFalse(args.test_tvos_host)
535+
self.assertFalse(args.test_watchos_host)
536+
self.assertFalse(args.test_android_host)
537537

538538

539539
if __name__ == '__main__':

0 commit comments

Comments
 (0)