|
|
|
@ -33,13 +33,10 @@ def main() -> None:
|
|
|
|
contexts = (
|
|
|
|
contexts = (
|
|
|
|
MyPyContext('ansible-test', ['test/lib/ansible_test/'], controller_python_versions),
|
|
|
|
MyPyContext('ansible-test', ['test/lib/ansible_test/'], controller_python_versions),
|
|
|
|
MyPyContext('ansible-test', ['test/lib/ansible_test/_util/target/'], remote_only_python_versions),
|
|
|
|
MyPyContext('ansible-test', ['test/lib/ansible_test/_util/target/'], remote_only_python_versions),
|
|
|
|
|
|
|
|
|
|
|
|
MyPyContext('ansible-core', ['lib/ansible/'], controller_python_versions),
|
|
|
|
MyPyContext('ansible-core', ['lib/ansible/'], controller_python_versions),
|
|
|
|
MyPyContext('ansible-core', ['lib/ansible/modules/', 'lib/ansible/module_utils/'], remote_only_python_versions),
|
|
|
|
MyPyContext('ansible-core', ['lib/ansible/modules/', 'lib/ansible/module_utils/'], remote_only_python_versions),
|
|
|
|
|
|
|
|
|
|
|
|
MyPyContext('ansible-core', ['test/units/'], controller_python_versions),
|
|
|
|
MyPyContext('ansible-core', ['test/units/'], controller_python_versions),
|
|
|
|
MyPyContext('ansible-core', ['test/units/modules/', 'test/units/module_utils/'], remote_only_python_versions),
|
|
|
|
MyPyContext('ansible-core', ['test/units/modules/', 'test/units/module_utils/'], remote_only_python_versions),
|
|
|
|
|
|
|
|
|
|
|
|
MyPyContext('packaging', ['packaging/'], controller_python_versions),
|
|
|
|
MyPyContext('packaging', ['packaging/'], controller_python_versions),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
@ -61,14 +58,16 @@ def main() -> None:
|
|
|
|
|
|
|
|
|
|
|
|
match = re.search(r'^(?P<message>.*) {2}\[(?P<code>.*)]$', message.message)
|
|
|
|
match = re.search(r'^(?P<message>.*) {2}\[(?P<code>.*)]$', message.message)
|
|
|
|
|
|
|
|
|
|
|
|
messages.append(SanityMessage(
|
|
|
|
messages.append(
|
|
|
|
message=match.group('message'),
|
|
|
|
SanityMessage(
|
|
|
|
path=message.path,
|
|
|
|
message=match.group('message'),
|
|
|
|
line=message.line,
|
|
|
|
path=message.path,
|
|
|
|
column=message.column,
|
|
|
|
line=message.line,
|
|
|
|
level=message.level,
|
|
|
|
column=message.column,
|
|
|
|
code=match.group('code'),
|
|
|
|
level=message.level,
|
|
|
|
))
|
|
|
|
code=match.group('code'),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# FUTURE: provide a way for script based tests to report non-error messages (in this case, notices)
|
|
|
|
# FUTURE: provide a way for script based tests to report non-error messages (in this case, notices)
|
|
|
|
|
|
|
|
|
|
|
|
@ -172,14 +171,17 @@ def test_context(
|
|
|
|
|
|
|
|
|
|
|
|
parsed = parse_to_list_of_dict(pattern, stdout or '')
|
|
|
|
parsed = parse_to_list_of_dict(pattern, stdout or '')
|
|
|
|
|
|
|
|
|
|
|
|
messages = [SanityMessage(
|
|
|
|
messages = [
|
|
|
|
level=r['level'],
|
|
|
|
SanityMessage(
|
|
|
|
message=r['message'],
|
|
|
|
level=r['level'],
|
|
|
|
path=r['path'],
|
|
|
|
message=r['message'],
|
|
|
|
line=int(r['line']),
|
|
|
|
path=r['path'],
|
|
|
|
column=int(r.get('column') or '0'),
|
|
|
|
line=int(r['line']),
|
|
|
|
code='', # extracted from error level messages later
|
|
|
|
column=int(r.get('column') or '0'),
|
|
|
|
) for r in parsed]
|
|
|
|
code='', # extracted from error level messages later
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
for r in parsed
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
return messages
|
|
|
|
return messages
|
|
|
|
|
|
|
|
|
|
|
|
|