1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix path handling in validate-modules sanity test.

This commit is contained in:
Matt Clay 2018-02-20 08:51:01 -08:00
parent fdbd1297cf
commit a9b58b84d8
2 changed files with 6 additions and 12 deletions

View file

@ -17,7 +17,6 @@ from lib.util import (
SubprocessError, SubprocessError,
display, display,
run_command, run_command,
deepest_path,
) )
from lib.ansible_util import ( from lib.ansible_util import (
@ -45,10 +44,14 @@ class ValidateModulesTest(SanitySingleVersion):
:type targets: SanityTargets :type targets: SanityTargets
:rtype: SanityResult :rtype: SanityResult
""" """
with open(VALIDATE_SKIP_PATH, 'r') as skip_fd:
skip_paths = skip_fd.read().splitlines()
skip_paths_set = set(skip_paths)
env = ansible_environment(args, color=False) env = ansible_environment(args, color=False)
paths = [deepest_path(i.path, 'lib/ansible/modules/') for i in targets.include_external] paths = sorted([i.path for i in targets.include if i.module and i.path not in skip_paths_set])
paths = sorted(set(p for p in paths if p))
if not paths: if not paths:
return SanitySkipped(self.name) return SanitySkipped(self.name)
@ -60,9 +63,6 @@ class ValidateModulesTest(SanitySingleVersion):
'--arg-spec', '--arg-spec',
] + paths ] + paths
with open(VALIDATE_SKIP_PATH, 'r') as skip_fd:
skip_paths = skip_fd.read().splitlines()
invalid_ignores = [] invalid_ignores = []
with open(VALIDATE_IGNORE_PATH, 'r') as ignore_fd: with open(VALIDATE_IGNORE_PATH, 'r') as ignore_fd:
@ -81,11 +81,6 @@ class ValidateModulesTest(SanitySingleVersion):
ignore[path][code] = line ignore[path][code] = line
skip_paths += [e.path for e in targets.exclude_external]
if skip_paths:
cmd += ['--exclude', '^(%s)' % '|'.join(skip_paths)]
if args.base_branch: if args.base_branch:
cmd.extend([ cmd.extend([
'--base-branch', args.base_branch, '--base-branch', args.base_branch,

View file

@ -2414,7 +2414,6 @@ lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py E325
lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py E326 lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py E326
lib/ansible/modules/network/nxos/nxos_command.py E325 lib/ansible/modules/network/nxos/nxos_command.py E325
lib/ansible/modules/network/nxos/nxos_command.py E326 lib/ansible/modules/network/nxos/nxos_command.py E326
lib/ansible/modules/network/nxos/nxos_config.py E324
lib/ansible/modules/network/nxos/nxos_config.py E325 lib/ansible/modules/network/nxos/nxos_config.py E325
lib/ansible/modules/network/nxos/nxos_config.py E326 lib/ansible/modules/network/nxos/nxos_config.py E326
lib/ansible/modules/network/nxos/nxos_evpn_global.py E325 lib/ansible/modules/network/nxos/nxos_evpn_global.py E325