Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support skip of platforms by version in tests. #48826

Merged
merged 2 commits into from
Nov 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ Aliases can be used to skip platforms using one of the following:
- ``skip/rhel`` - Skip tests on RHEL.
- ``skip/docker`` - Skip tests when running on a Docker container

Platform versions, as specified using the ``--remote`` option with ``/`` removed, can also be skipped:

- ``skip/freebsd11.1`` - Skip tests on FreeBSD 11.1.
- ``skip/rhel7.6`` - Skip tests on RHEL 7.6.

Aliases can be used to skip Python major versions using one of the following:

- ``skip/python2`` - Skip tests on Python 2.x.
Expand Down
7 changes: 7 additions & 0 deletions test/runner/lib/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down