Remove ansible-test obsolete net_* target logic.

This commit is contained in:
Matt Clay 2018-01-10 09:32:53 -08:00
parent 60b3a191e6
commit f968776d86

View file

@ -373,7 +373,6 @@ def network_init(args, internal_targets):
return return
platform_targets = set(a for t in internal_targets for a in t.aliases if a.startswith('network/')) platform_targets = set(a for t in internal_targets for a in t.aliases if a.startswith('network/'))
net_commands = set(a[4:] for t in internal_targets for a in t.aliases if a.startswith('net_'))
instances = [] # type: list [lib.thread.WrappedThread] instances = [] # type: list [lib.thread.WrappedThread]
@ -384,10 +383,7 @@ def network_init(args, internal_targets):
platform, version = platform_version.split('/', 1) platform, version = platform_version.split('/', 1)
platform_target = 'network/%s/' % platform platform_target = 'network/%s/' % platform
# check to see if the platform supports any of the platform agnostic tests we're going to run (if any) if platform_target not in platform_targets:
platform_agnostic = any(os.path.exists('lib/ansible/modules/network/%s/%s_%s.py' % (platform, platform, command)) for command in net_commands)
if platform_target not in platform_targets and not platform_agnostic:
display.warning('Skipping "%s" because selected tests do not target the "%s" platform.' % ( display.warning('Skipping "%s" because selected tests do not target the "%s" platform.' % (
platform_version, platform)) platform_version, platform))
continue continue