mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 14:21:26 -07:00
Support comments in ansible-test flat files.
This commit is contained in:
parent
cb4bf04be6
commit
5a3000af19
13 changed files with 135 additions and 96 deletions
|
@ -17,6 +17,7 @@ from lib.util import (
|
|||
run_command,
|
||||
display,
|
||||
find_python,
|
||||
read_lines_without_comments,
|
||||
)
|
||||
|
||||
from lib.config import (
|
||||
|
@ -37,12 +38,10 @@ class CompileTest(SanityMultipleVersion):
|
|||
:type python_version: str
|
||||
:rtype: TestResult
|
||||
"""
|
||||
# optional list of regex patterns to exclude from tests
|
||||
skip_file = 'test/sanity/compile/python%s-skip.txt' % python_version
|
||||
|
||||
if os.path.exists(skip_file):
|
||||
with open(skip_file, 'r') as skip_fd:
|
||||
skip_paths = skip_fd.read().splitlines()
|
||||
skip_paths = read_lines_without_comments(skip_file)
|
||||
else:
|
||||
skip_paths = []
|
||||
|
||||
|
@ -87,6 +86,9 @@ class CompileTest(SanityMultipleVersion):
|
|||
for path in skip_paths:
|
||||
line += 1
|
||||
|
||||
if not path:
|
||||
continue
|
||||
|
||||
if not os.path.exists(path):
|
||||
# Keep files out of the list which no longer exist in the repo.
|
||||
results.append(SanityMessage(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue