mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Support skip of platforms by version in tests. (#48826)
* Support skip of platforms by version in tests.
Previously a remote platform could be skipped completely using the alias:
`skip/{platform}` such as `skip/rhel`
Now a specific platform version can be skipped using the alias:
`skip/{platform}{version}` such as `skip/rhel7.6`
This feature is available for platforms specified with the `--remote` option.
* Add skip by version to the docs.
This commit is contained in:
@@ -1632,6 +1632,13 @@ def get_integration_remote_filter(args, targets):
|
||||
display.warning('Excluding tests marked "%s" which are not supported on %s: %s'
|
||||
% (skip.rstrip('/'), platform, ', '.join(skipped)))
|
||||
|
||||
skip = 'skip/%s/' % args.remote.replace('/', '')
|
||||
skipped = [target.name for target in targets if skip in target.aliases]
|
||||
if skipped:
|
||||
exclude.append(skip)
|
||||
display.warning('Excluding tests marked "%s" which are not supported on %s: %s'
|
||||
% (skip.rstrip('/'), platform, ', '.join(skipped)))
|
||||
|
||||
python_version = 2 # remotes are expected to default to python 2
|
||||
|
||||
skip = 'skip/python%d/' % python_version
|
||||
|
||||
Reference in New Issue
Block a user