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:
parent
fdbd1297cf
commit
a9b58b84d8
2 changed files with 6 additions and 12 deletions
|
@ -17,7 +17,6 @@ from lib.util import (
|
|||
SubprocessError,
|
||||
display,
|
||||
run_command,
|
||||
deepest_path,
|
||||
)
|
||||
|
||||
from lib.ansible_util import (
|
||||
|
@ -45,10 +44,14 @@ class ValidateModulesTest(SanitySingleVersion):
|
|||
:type targets: SanityTargets
|
||||
: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)
|
||||
|
||||
paths = [deepest_path(i.path, 'lib/ansible/modules/') for i in targets.include_external]
|
||||
paths = sorted(set(p for p in paths if p))
|
||||
paths = sorted([i.path for i in targets.include if i.module and i.path not in skip_paths_set])
|
||||
|
||||
if not paths:
|
||||
return SanitySkipped(self.name)
|
||||
|
@ -60,9 +63,6 @@ class ValidateModulesTest(SanitySingleVersion):
|
|||
'--arg-spec',
|
||||
] + paths
|
||||
|
||||
with open(VALIDATE_SKIP_PATH, 'r') as skip_fd:
|
||||
skip_paths = skip_fd.read().splitlines()
|
||||
|
||||
invalid_ignores = []
|
||||
|
||||
with open(VALIDATE_IGNORE_PATH, 'r') as ignore_fd:
|
||||
|
@ -81,11 +81,6 @@ class ValidateModulesTest(SanitySingleVersion):
|
|||
|
||||
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:
|
||||
cmd.extend([
|
||||
'--base-branch', args.base_branch,
|
||||
|
|
|
@ -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_command.py E325
|
||||
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 E326
|
||||
lib/ansible/modules/network/nxos/nxos_evpn_global.py E325
|
||||
|
|
Loading…
Reference in a new issue