mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 01:46:18 +00:00
[PR #11686/68ae04a9 backport][stable-12] Cleanup of aliases skip statements (#11709)
Cleanup of `aliases` skip statements (#11686)
* add scripts to clean aliases' skips
* remove legacy skips
* code cosmetics
* add license to ALIASES.md
* Fix typos in ALIASES.md documentation
* rolling back freebsd14.2 and 14.3 in iso_extract
* fix versions and re-run
(cherry picked from commit 68ae04a95a)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
de180d01e0
commit
66d394dc81
68 changed files with 109 additions and 128 deletions
|
|
@ -6,5 +6,4 @@ azp/posix/3
|
|||
destructive
|
||||
needs/root
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
azp/posix/2
|
||||
needs/root
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
skip/rhel
|
||||
|
|
|
|||
|
|
@ -5,4 +5,3 @@
|
|||
azp/posix/2
|
||||
needs/root
|
||||
destructive
|
||||
skip/osx # FIXME
|
||||
|
|
|
|||
|
|
@ -7,5 +7,4 @@ azp/posix/vm
|
|||
destructive
|
||||
needs/privileged
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -4,6 +4,5 @@
|
|||
|
||||
azp/posix/1
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
azp/posix/1
|
||||
needs/root
|
||||
skip/macos
|
||||
skip/osx
|
||||
skip/freebsd
|
||||
skip/rhel10.0 # FIXME
|
||||
skip/rhel10.1 # FIXME
|
||||
|
|
|
|||
|
|
@ -5,5 +5,4 @@
|
|||
azp/posix/3
|
||||
destructive
|
||||
skip/macos
|
||||
skip/osx
|
||||
skip/freebsd
|
||||
|
|
|
|||
|
|
@ -4,5 +4,4 @@
|
|||
|
||||
azp/posix/3
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -5,21 +5,7 @@
|
|||
azp/posix/2
|
||||
skip/freebsd
|
||||
skip/macos
|
||||
skip/osx
|
||||
skip/rhel8.2
|
||||
skip/rhel8.3
|
||||
skip/rhel8.4
|
||||
skip/rhel8.5
|
||||
skip/rhel8.6
|
||||
skip/rhel8.7
|
||||
skip/rhel8.8
|
||||
skip/rhel9.0
|
||||
skip/rhel9.1
|
||||
skip/rhel9.2
|
||||
skip/rhel9.3
|
||||
skip/rhel9.4
|
||||
skip/rhel9.5
|
||||
skip/rhel9.6
|
||||
skip/rhel9.7
|
||||
skip/rhel10.0
|
||||
skip/rhel10.1
|
||||
|
|
|
|||
|
|
@ -5,21 +5,7 @@
|
|||
azp/posix/2
|
||||
skip/freebsd
|
||||
skip/macos
|
||||
skip/osx
|
||||
skip/rhel8.2
|
||||
skip/rhel8.3
|
||||
skip/rhel8.4
|
||||
skip/rhel8.5
|
||||
skip/rhel8.6
|
||||
skip/rhel8.7
|
||||
skip/rhel8.8
|
||||
skip/rhel9.0
|
||||
skip/rhel9.1
|
||||
skip/rhel9.2
|
||||
skip/rhel9.3
|
||||
skip/rhel9.4
|
||||
skip/rhel9.5
|
||||
skip/rhel9.6
|
||||
skip/rhel9.7
|
||||
skip/rhel10.0
|
||||
skip/rhel10.1
|
||||
|
|
|
|||
|
|
@ -4,5 +4,4 @@
|
|||
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/1
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel
|
||||
skip/freebsd
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/3
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
skip/alpine
|
||||
|
|
|
|||
|
|
@ -4,6 +4,5 @@
|
|||
|
||||
azp/posix/1
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
|
|
|||
|
|
@ -5,5 +5,4 @@
|
|||
azp/posix/1
|
||||
azp/posix/vm
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
azp/posix/3
|
||||
destructive
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel
|
||||
needs/root
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
azp/posix/3
|
||||
destructive
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel
|
||||
needs/root
|
||||
|
|
|
|||
|
|
@ -4,5 +4,4 @@
|
|||
|
||||
azp/posix/1
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -7,4 +7,3 @@ skip/freebsd
|
|||
skip/rhel
|
||||
skip/docker
|
||||
skip/macos14.3
|
||||
skip/macos13.2
|
||||
|
|
|
|||
|
|
@ -4,15 +4,8 @@
|
|||
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel9.0 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
skip/rhel9.1 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
skip/rhel9.2 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
skip/rhel9.3 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
skip/rhel9.4 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
skip/rhel9.5 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
skip/rhel9.6 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
skip/rhel9.7 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
skip/rhel10.0 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
skip/rhel10.1 # See https://www.reddit.com/r/Fedora/comments/si7nzk/homectl/
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
azp/posix/1
|
||||
destructive
|
||||
disabled
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
skip/rhel
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ azp/posix/vm
|
|||
destructive
|
||||
skip/docker # kernel modules not loadable
|
||||
skip/freebsd # no iptables/netfilter (Linux specific)
|
||||
skip/osx # no iptables/netfilter (Linux specific)
|
||||
skip/macos # no iptables/netfilter (Linux specific)
|
||||
|
||||
skip/ubuntu22.04 # TODO there's a problem here!
|
||||
|
|
|
|||
|
|
@ -5,23 +5,11 @@
|
|||
azp/posix/1
|
||||
needs/target/setup_epel
|
||||
destructive
|
||||
skip/osx # FIXME
|
||||
skip/rhel9.0 # FIXME
|
||||
skip/rhel9.1 # FIXME
|
||||
skip/rhel9.2 # FIXME
|
||||
skip/rhel9.3 # FIXME
|
||||
skip/rhel9.4 # FIXME
|
||||
skip/rhel9.5 # FIXME
|
||||
skip/rhel9.6 # FIXME
|
||||
skip/rhel9.7 # FIXME
|
||||
skip/rhel10.0 # FIXME
|
||||
skip/rhel10.1 # FIXME
|
||||
skip/freebsd12.4 # FIXME
|
||||
skip/freebsd13.2 # FIXME
|
||||
skip/freebsd13.3 # FIXME
|
||||
skip/freebsd13.4 # FIXME
|
||||
skip/freebsd13.5 # FIXME
|
||||
skip/freebsd14.0 # FIXME
|
||||
skip/freebsd14.1 # FIXME
|
||||
skip/freebsd14.2 # FIXME
|
||||
skip/freebsd14.3 # FIXME
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
azp/posix/3
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
needs/root
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
azp/posix/3
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
needs/root
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
azp/posix/1
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
skip/rhel
|
||||
|
|
|
|||
|
|
@ -15,6 +15,5 @@ skip/docker
|
|||
skip/fedora # TODO: make this work (not running in CI right now)
|
||||
skip/freebsd
|
||||
skip/macos
|
||||
skip/osx
|
||||
skip/rhel # TODO: make this work
|
||||
skip/ubuntu22.04
|
||||
|
|
|
|||
|
|
@ -4,5 +4,4 @@
|
|||
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel
|
||||
needs/root
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel
|
||||
needs/root
|
||||
|
|
|
|||
|
|
@ -4,6 +4,5 @@
|
|||
|
||||
azp/posix/3
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
|
|
|||
|
|
@ -5,6 +5,5 @@
|
|||
azp/posix/1
|
||||
destructive
|
||||
needs/target/setup_etcd3
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
|
|
|||
|
|
@ -5,5 +5,4 @@
|
|||
azp/posix/1
|
||||
destructive
|
||||
skip/rhel
|
||||
skip/osx # FIXME https://github.com/ansible-collections/community.general/issues/2978
|
||||
skip/macos # FIXME https://github.com/ansible-collections/community.general/issues/2978
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ azp/posix/vm
|
|||
destructive
|
||||
needs/privileged
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/alpine3.21 # TODO try to fix
|
||||
skip/alpine3.22 # TODO try to fix
|
||||
|
|
|
|||
|
|
@ -8,5 +8,4 @@ azp/posix/vm
|
|||
destructive
|
||||
needs/privileged
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -8,5 +8,4 @@ azp/posix/vm
|
|||
destructive
|
||||
needs/privileged
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -8,5 +8,4 @@ azp/posix/vm
|
|||
destructive
|
||||
needs/privileged
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -7,5 +7,4 @@ azp/posix/vm
|
|||
destructive
|
||||
needs/privileged
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
azp/posix/2
|
||||
destructive
|
||||
needs/target/setup_epel
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
skip/rhel # FIXME
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/1
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
skip/rhel
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
skip/rhel
|
||||
|
|
|
|||
|
|
@ -5,6 +5,5 @@
|
|||
azp/posix/2
|
||||
nomad_job_info
|
||||
destructive
|
||||
skip/centos6
|
||||
skip/freebsd
|
||||
disabled # TODO
|
||||
|
|
|
|||
|
|
@ -4,16 +4,8 @@
|
|||
|
||||
azp/posix/1
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel8.0
|
||||
skip/rhel9.0
|
||||
skip/rhel9.1
|
||||
skip/rhel9.2
|
||||
skip/rhel9.3
|
||||
skip/rhel9.4
|
||||
skip/rhel9.5
|
||||
skip/rhel9.6
|
||||
skip/rhel9.7
|
||||
skip/rhel10.0
|
||||
skip/rhel10.1
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
azp/posix/1
|
||||
destructive
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel
|
||||
needs/root
|
||||
|
|
|
|||
|
|
@ -4,5 +4,4 @@
|
|||
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -4,5 +4,4 @@
|
|||
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
azp/posix/2
|
||||
azp/posix/vm
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/docker
|
||||
needs/root
|
||||
|
|
|
|||
|
|
@ -5,5 +5,4 @@
|
|||
azp/posix/1
|
||||
needs/root
|
||||
skip/docker
|
||||
skip/osx
|
||||
skip/rhel
|
||||
|
|
|
|||
|
|
@ -4,6 +4,5 @@
|
|||
|
||||
azp/posix/1
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
azp/posix/1
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/windows
|
||||
skip/freebsd
|
||||
unsupported
|
||||
|
|
|
|||
|
|
@ -7,7 +7,5 @@ azp/posix/vm
|
|||
skip/alpine
|
||||
skip/fedora
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/docker
|
||||
skip/rhel8.8 # TODO: fix
|
||||
|
|
|
|||
|
|
@ -7,7 +7,5 @@ azp/posix/vm
|
|||
skip/alpine
|
||||
skip/fedora
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/docker
|
||||
skip/rhel8.8 # TODO: fix
|
||||
|
|
|
|||
|
|
@ -5,5 +5,4 @@
|
|||
azp/posix/1
|
||||
needs/root
|
||||
skip/docker
|
||||
skip/osx
|
||||
skip/rhel
|
||||
|
|
|
|||
|
|
@ -6,5 +6,4 @@ needs/root
|
|||
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -6,5 +6,4 @@ needs/root
|
|||
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
|||
|
|
@ -5,5 +5,4 @@
|
|||
needs/root
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
@ -3,7 +3,5 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/1
|
||||
skip/windows
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
|
|
|||
|
|
@ -4,6 +4,4 @@
|
|||
|
||||
azp/posix/1
|
||||
destructive
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel7.9 # TODO: '/bin/timedatectl set-local-rtc no' fails with 'Failed to set local RTC: Failed to set RTC to local/UTC: Input/output error'
|
||||
|
|
|
|||
|
|
@ -4,17 +4,9 @@
|
|||
|
||||
azp/posix/2
|
||||
azp/posix/vm
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
skip/rhel8.0 # FIXME
|
||||
skip/rhel9.0 # FIXME
|
||||
skip/rhel9.1 # FIXME
|
||||
skip/rhel9.2 # FIXME
|
||||
skip/rhel9.3 # FIXME
|
||||
skip/rhel9.4 # FIXME
|
||||
skip/rhel9.5 # FIXME
|
||||
skip/rhel9.6 # FIXME
|
||||
skip/rhel9.7 # FIXME
|
||||
skip/rhel10.0 # FIXME
|
||||
skip/rhel10.1 # FIXME
|
||||
|
|
|
|||
|
|
@ -6,6 +6,5 @@ azp/posix/2
|
|||
azp/posix/vm
|
||||
skip/docker
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
destructive
|
||||
|
|
|
|||
|
|
@ -6,6 +6,5 @@ azp/posix/1
|
|||
azp/posix/vm
|
||||
needs/privileged
|
||||
needs/root
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
|
|
|||
|
|
@ -4,7 +4,5 @@
|
|||
|
||||
azp/posix/1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel8.4 # TODO make sure that tests work on 8.4 as well!
|
||||
disabled # TODO
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ azp/posix/vm
|
|||
destructive
|
||||
needs/privileged
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel
|
||||
skip/docker
|
||||
|
|
|
|||
|
|
@ -5,6 +5,5 @@
|
|||
azp/posix/1
|
||||
destructive
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel
|
||||
|
|
|
|||
|
|
@ -5,6 +5,5 @@
|
|||
azp/posix/1
|
||||
destructive
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/rhel
|
||||
|
|
|
|||
38
tests/utils/ALIASES.md
Normal file
38
tests/utils/ALIASES.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<!--
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
# Cleaning up `aliases` skips
|
||||
|
||||
The skip statements in `tests/integration/targets/*/aliases` files may contain specific OSes and their versions.
|
||||
|
||||
For example:
|
||||
|
||||
skip/rhel8.8
|
||||
skip/centos6
|
||||
skip/macos
|
||||
|
||||
Those items being skipped are called `remotes` and they come from the file `test/lib/ansible_test/_data/completion/remote.txt`
|
||||
in the `ansible-core` repository. Eventually, these remotes are removed from that `ansible_test` config,
|
||||
but they keep silently cluttering the aliases files here.
|
||||
|
||||
The scripts `list-remotes` and `clean-aliases-skips` can help you remove those entries from the `aliases` files.
|
||||
For that, you will need to have a clone of the `ansible-core` repository in your machine.
|
||||
|
||||
In the example below, the path to that repo is `../ansible`:
|
||||
|
||||
```shell
|
||||
./tests/utils/list-remotes ../ansible
|
||||
```
|
||||
|
||||
**Note:** The supported versions of `ansible-core` are hardcoded in `list-remotes`. Those should be updated or automated in the future.
|
||||
|
||||
To remove all the skips that are **not** in that list, you should run:
|
||||
|
||||
```shell
|
||||
./tests/utils/list-remotes ../ansible | ./tests/utils/clean-aliases-skips
|
||||
```
|
||||
|
||||
Make sure to thoroughly review the changes before committing!
|
||||
42
tests/utils/clean-aliases-skips
Executable file
42
tests/utils/clean-aliases-skips
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def sanitize(filepath, remotes_re):
|
||||
with open(filepath) as fileread:
|
||||
lines = fileread.readlines()
|
||||
|
||||
changed = False
|
||||
out_lines = []
|
||||
for ll in lines:
|
||||
if not ll.startswith("skip/") or any(r.match(ll) for r in remotes_re):
|
||||
out_lines.append(ll)
|
||||
continue
|
||||
changed = True
|
||||
|
||||
if changed:
|
||||
print(f"sanitizing {filepath}", file=sys.stderr)
|
||||
with open(filepath, "w") as filewrite:
|
||||
filewrite.writelines(out_lines)
|
||||
|
||||
|
||||
def main():
|
||||
remotes = [x.strip() for x in sys.stdin.readlines()]
|
||||
remotes.append("docker")
|
||||
|
||||
print(f"Valid remotes: {', '.join(remotes)}", file=sys.stderr)
|
||||
|
||||
remotes_re = [re.compile(rf"^skip/{r}(\s.*)?$") for r in remotes]
|
||||
|
||||
for filepath in Path("tests/integration/targets").glob("*/aliases"):
|
||||
sanitize(filepath, remotes_re)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
29
tests/utils/list-remotes
Executable file
29
tests/utils/list-remotes
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
SUPPORTED_AC2="17 18 19 20"
|
||||
|
||||
[ -z "$1" ] && {
|
||||
echo 'usage: ./tests/utils/list-remotes <ansible git repo dir>' >&2
|
||||
exit 1
|
||||
}
|
||||
ansible_repo_dir="$1"
|
||||
|
||||
(
|
||||
cd "$ansible_repo_dir"
|
||||
|
||||
versions=$(
|
||||
for minor in $SUPPORTED_AC2; do
|
||||
echo v2.$minor.$(git tag -l | awk -F. "\$2 == $minor && /v2\.[0-9]+\.[0-9]+$/ { print \$3 }" | sort -rn | head -1)
|
||||
done
|
||||
)
|
||||
versions="$versions devel"
|
||||
|
||||
echo "Listing remotes from ansible-core:" $versions >&2
|
||||
for head in $versions; do
|
||||
git checkout -q $head
|
||||
cat test/lib/ansible_test/_data/completion/remote.txt
|
||||
done | awk '/[a-z]+(\/[0-9]+)?/ { print $1 }' | sort -u | sed -e s'/\///g'
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue