mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 14:21:26 -07:00
Fix ansible-test python and pip executable search.
This commit is contained in:
parent
dd37857884
commit
a8487feb70
14 changed files with 81 additions and 75 deletions
|
@ -15,6 +15,7 @@ from lib.util import (
|
|||
SubprocessError,
|
||||
run_command,
|
||||
parse_to_dict,
|
||||
display,
|
||||
find_executable,
|
||||
)
|
||||
|
||||
|
@ -22,6 +23,10 @@ from lib.config import (
|
|||
SanityConfig,
|
||||
)
|
||||
|
||||
UNSUPPORTED_PYTHON_VERSIONS = (
|
||||
'2.6',
|
||||
)
|
||||
|
||||
|
||||
class RstcheckTest(SanitySingleVersion):
|
||||
"""Sanity test using rstcheck."""
|
||||
|
@ -31,6 +36,10 @@ class RstcheckTest(SanitySingleVersion):
|
|||
:type targets: SanityTargets
|
||||
:rtype: SanityResult
|
||||
"""
|
||||
if args.python_version in UNSUPPORTED_PYTHON_VERSIONS:
|
||||
display.warning('Skipping rstcheck on unsupported Python version %s.' % args.python_version)
|
||||
return SanitySkipped(self.name)
|
||||
|
||||
with open('test/sanity/rstcheck/ignore-substitutions.txt', 'r') as ignore_fd:
|
||||
ignore_substitutions = sorted(set(ignore_fd.read().splitlines()))
|
||||
|
||||
|
@ -40,8 +49,8 @@ class RstcheckTest(SanitySingleVersion):
|
|||
return SanitySkipped(self.name)
|
||||
|
||||
cmd = [
|
||||
'python%s' % args.python_version,
|
||||
find_executable('rstcheck'),
|
||||
args.python_executable,
|
||||
'-m', 'rstcheck',
|
||||
'--report', 'warning',
|
||||
'--ignore-substitutions', ','.join(ignore_substitutions),
|
||||
] + paths
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue