Skip to content

Revert erroneous renaming of test_*_host destinations to `test_*_de… #12127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions utils/build-script
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class BuildScriptInvocation(object):
self.platforms_to_skip_test.add(StdlibDeploymentTarget.Cygwin)
if not args.test_osx:
self.platforms_to_skip_test.add(StdlibDeploymentTarget.OSX)
if not args.test_ios_device:
if not args.test_ios_host:
self.platforms_to_skip_test.add(StdlibDeploymentTarget.iOS)
else:
exit_rejecting_arguments("error: iOS device tests are not " +
Expand All @@ -326,15 +326,15 @@ class BuildScriptInvocation(object):
if not args.test_ios_32bit_simulator:
self.platforms_archs_to_skip_test.add(
StdlibDeploymentTarget.iOSSimulator.i386)
if not args.test_tvos_device:
if not args.test_tvos_host:
self.platforms_to_skip_test.add(StdlibDeploymentTarget.AppleTV)
else:
exit_rejecting_arguments("error: tvOS device tests are not " +
"supported in open-source Swift.")
if not args.test_tvos_simulator:
self.platforms_to_skip_test.add(
StdlibDeploymentTarget.AppleTVSimulator)
if not args.test_watchos_device:
if not args.test_watchos_host:
self.platforms_to_skip_test.add(StdlibDeploymentTarget.AppleWatch)
else:
exit_rejecting_arguments("error: watchOS device tests are not " +
Expand All @@ -343,16 +343,16 @@ class BuildScriptInvocation(object):
self.platforms_to_skip_test.add(
StdlibDeploymentTarget.AppleWatchSimulator)

if not args.test_android_device:
if not args.test_android_host:
self.platforms_to_skip_test.add(StdlibDeploymentTarget.Android)

self.platforms_to_skip_test_host = set()
if not args.test_ios_device:
if not args.test_ios_host:
self.platforms_to_skip_test_host.add(StdlibDeploymentTarget.iOS)
if not args.test_tvos_device:
if not args.test_tvos_host:
self.platforms_to_skip_test_host.add(
StdlibDeploymentTarget.AppleTV)
if not args.test_watchos_device:
if not args.test_watchos_host:
self.platforms_to_skip_test_host.add(
StdlibDeploymentTarget.AppleWatch)

Expand Down Expand Up @@ -593,21 +593,21 @@ class BuildScriptInvocation(object):
impl_args += ["--skip-test-cygwin"]
if not args.test_osx:
impl_args += ["--skip-test-osx"]
if not args.test_ios_device:
if not args.test_ios_host:
impl_args += ["--skip-test-ios-host"]
if not args.test_ios_simulator:
impl_args += ["--skip-test-ios-simulator"]
if not args.test_ios_32bit_simulator:
impl_args += ["--skip-test-ios-32bit-simulator"]
if not args.test_tvos_device:
if not args.test_tvos_host:
impl_args += ["--skip-test-tvos-host"]
if not args.test_tvos_simulator:
impl_args += ["--skip-test-tvos-simulator"]
if not args.test_watchos_device:
if not args.test_watchos_host:
impl_args += ["--skip-test-watchos-host"]
if not args.test_watchos_simulator:
impl_args += ["--skip-test-watchos-simulator"]
if not args.test_android_device:
if not args.test_android_host:
impl_args += ["--skip-test-android-host"]
if args.build_runtime_with_host_compiler:
impl_args += ["--build-runtime-with-host-compiler"]
Expand Down
30 changes: 15 additions & 15 deletions utils/build_swift/driver_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,43 +215,43 @@ def _apply_default_arguments(args):

# --skip-test-ios is merely a shorthand for host and simulator tests.
if not args.test_ios:
args.test_ios_device = False
args.test_ios_host = False
args.test_ios_simulator = False
# --skip-test-tvos is merely a shorthand for host and simulator tests.
if not args.test_tvos:
args.test_tvos_device = False
args.test_tvos_host = False
args.test_tvos_simulator = False
# --skip-test-watchos is merely a shorthand for host and simulator
# --tests.
if not args.test_watchos:
args.test_watchos_device = False
args.test_watchos_host = False
args.test_watchos_simulator = False

# --skip-build-{ios,tvos,watchos}-{device,simulator} implies
# --skip-test-{ios,tvos,watchos}-{host,simulator}
if not args.build_ios_device:
args.test_ios_device = False
args.test_ios_host = False
if not args.build_ios_simulator:
args.test_ios_simulator = False

if not args.build_tvos_device:
args.test_tvos_device = False
args.test_tvos_host = False
if not args.build_tvos_simulator:
args.test_tvos_simulator = False

if not args.build_watchos_device:
args.test_watchos_device = False
args.test_watchos_host = False
if not args.build_watchos_simulator:
args.test_watchos_simulator = False

if not args.build_android:
args.test_android_device = False
args.test_android_host = False

if not args.host_test:
args.test_ios_device = False
args.test_tvos_device = False
args.test_watchos_device = False
args.test_android_device = False
args.test_ios_host = False
args.test_tvos_host = False
args.test_watchos_host = False
args.test_android_host = False

if args.build_subdir is None:
args.build_subdir = \
Expand Down Expand Up @@ -798,7 +798,7 @@ def create_argument_parser():
help="skip testing iOS 32 bit simulator targets")
skip_test_group.add_argument(
"--skip-test-ios-host",
dest='test_ios_device',
dest='test_ios_host',
action=arguments.action.optional_false,
help="skip testing iOS device targets on the host machine (the phone "
"itself)")
Expand All @@ -815,7 +815,7 @@ def create_argument_parser():
help="skip testing tvOS simulator targets")
skip_test_group.add_argument(
"--skip-test-tvos-host",
dest='test_tvos_device',
dest='test_tvos_host',
action=arguments.action.optional_false,
help="skip testing tvOS device targets on the host machine (the TV "
"itself)")
Expand All @@ -832,13 +832,13 @@ def create_argument_parser():
help="skip testing watchOS simulator targets")
skip_test_group.add_argument(
"--skip-test-watchos-host",
dest='test_watchos_device',
dest='test_watchos_host',
action=arguments.action.optional_false,
help="skip testing watchOS device targets on the host machine (the "
"watch itself)")
skip_test_group.add_argument(
"--skip-test-android-host",
dest='test_android_device',
dest='test_android_host',
action=arguments.action.optional_false,
help="skip testing Android device targets on the host machine (the "
"phone itself)")
Expand Down
16 changes: 8 additions & 8 deletions utils/build_swift/tests/expected_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,23 +153,23 @@
'swift_user_visible_version': '4.1',
'symbols_package': None,
'test': None,
'test_android_device': False,
'test_android_host': False,
'test_cygwin': False,
'test_freebsd': False,
'test_ios': False,
'test_ios_32bit_simulator': True,
'test_ios_device': False,
'test_ios_host': False,
'test_ios_simulator': False,
'test_linux': False,
'test_optimize_for_size': None,
'test_optimized': None,
'test_osx': False,
'test_paths': [],
'test_tvos': False,
'test_tvos_device': False,
'test_tvos_host': False,
'test_tvos_simulator': False,
'test_watchos': False,
'test_watchos_device': False,
'test_watchos_host': False,
'test_watchos_simulator': False,
'tvos': False,
'tvos_all': False,
Expand Down Expand Up @@ -393,22 +393,22 @@ class IgnoreOption(_BaseOption):
dest='build_watchos_device'),
ToggleOption('--skip-build-watchos-simulator',
dest='build_watchos_simulator'),
ToggleOption('--skip-test-android-host', dest='test_android_device'),
ToggleOption('--skip-test-android-host', dest='test_android_host'),
ToggleOption('--skip-test-cygwin', dest='test_cygwin'),
ToggleOption('--skip-test-freebsd', dest='test_freebsd'),
ToggleOption('--skip-test-ios', dest='test_ios'),
ToggleOption('--skip-test-ios-32bit-simulator',
dest='test_ios_32bit_simulator'),
ToggleOption('--skip-test-ios-host', dest='test_ios_device'),
ToggleOption('--skip-test-ios-host', dest='test_ios_host'),
ToggleOption('--skip-test-ios-simulator', dest='test_ios_simulator'),
ToggleOption('--skip-test-linux', dest='test_linux'),
ToggleOption('--skip-test-osx', dest='test_osx'),
ToggleOption('--skip-test-tvos', dest='test_tvos'),
ToggleOption('--skip-test-tvos-host', dest='test_tvos_device'),
ToggleOption('--skip-test-tvos-host', dest='test_tvos_host'),
ToggleOption('--skip-test-tvos-simulator',
dest='test_tvos_simulator'),
ToggleOption('--skip-test-watchos', dest='test_watchos'),
ToggleOption('--skip-test-watchos-host', dest='test_watchos_device'),
ToggleOption('--skip-test-watchos-host', dest='test_watchos_host'),
ToggleOption('--skip-test-watchos-simulator',
dest='test_watchos_simulator'),
ToggleOption('--test', dest='test'),
Expand Down
24 changes: 12 additions & 12 deletions utils/build_swift/tests/test_driver_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def test_implied_defaults_skip_build_ios(self):
self.assertFalse(args.build_ios_simulator)

# Also implies that the tests should be skipped
self.assertFalse(args.test_ios_device)
self.assertFalse(args.test_ios_host)
self.assertFalse(args.test_ios_simulator)

def test_implied_defaults_skip_build_tvos(self):
Expand All @@ -456,7 +456,7 @@ def test_implied_defaults_skip_build_tvos(self):
self.assertFalse(args.build_tvos_simulator)

# Also implies that the tests should be skipped
self.assertFalse(args.test_tvos_device)
self.assertFalse(args.test_tvos_host)
self.assertFalse(args.test_tvos_simulator)

def test_implied_defaults_skip_build_watchos(self):
Expand All @@ -466,7 +466,7 @@ def test_implied_defaults_skip_build_watchos(self):
self.assertFalse(args.build_watchos_simulator)

# Also implies that the tests should be skipped
self.assertFalse(args.test_watchos_device)
self.assertFalse(args.test_watchos_host)
self.assertFalse(args.test_watchos_simulator)

def test_implied_defaults_validation_test(self):
Expand Down Expand Up @@ -503,37 +503,37 @@ def test_implied_defaults_skip_all_tests(self):
def test_implied_defaults_skip_test_ios(self):
with self.assertNotRaises(ParserError):
args = self.parse_args(['--skip-test-ios'])
self.assertFalse(args.test_ios_device)
self.assertFalse(args.test_ios_host)
self.assertFalse(args.test_ios_simulator)

def test_implied_defaults_skip_test_tvos(self):
with self.assertNotRaises(ParserError):
args = self.parse_args(['--skip-test-tvos'])
self.assertFalse(args.test_tvos_device)
self.assertFalse(args.test_tvos_host)
self.assertFalse(args.test_tvos_simulator)

def test_implied_defaults_skip_test_watchos(self):
with self.assertNotRaises(ParserError):
args = self.parse_args(['--skip-test-watchos'])
self.assertFalse(args.test_watchos_device)
self.assertFalse(args.test_watchos_host)
self.assertFalse(args.test_watchos_simulator)

def test_implied_defaults_skip_build_android(self):
with self.assertNotRaises(ParserError):
args = self.parse_args(['--android', '0'])
self.assertFalse(args.test_android_device)
self.assertFalse(args.test_android_host)

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

def test_implied_defaults_host_test(self):
with self.assertNotRaises(ParserError):
args = self.parse_args(['--host-test', '0'])
self.assertFalse(args.test_ios_device)
self.assertFalse(args.test_tvos_device)
self.assertFalse(args.test_watchos_device)
self.assertFalse(args.test_android_device)
self.assertFalse(args.test_ios_host)
self.assertFalse(args.test_tvos_host)
self.assertFalse(args.test_watchos_host)
self.assertFalse(args.test_android_host)


if __name__ == '__main__':
Expand Down