summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/ansible-test
diff options
context:
space:
mode:
authorMatt Clay <mclay@redhat.com>2021-04-23 09:26:19 +0200
committerGitHub <noreply@github.com>2021-04-23 09:26:19 +0200
commit6cfe36fa1fce56a04fd4d4953f35243099d83ae6 (patch)
treedbe0ab0eda7bbb6bbe1cddcb6e8fc36becff501e /test/integration/targets/ansible-test
parentUpdate ansible-test default test container. (#74393) (diff)
downloadansible-6cfe36fa1fce56a04fd4d4953f35243099d83ae6.tar.xz
ansible-6cfe36fa1fce56a04fd4d4953f35243099d83ae6.zip
Set ansible-test min controller Python to 3.8. (#74395)
- Version neutral sanity tests now require Python 3.8 or later. - Unit tests for controller-only code now require Python 3.8 or later.
Diffstat (limited to 'test/integration/targets/ansible-test')
-rwxr-xr-xtest/integration/targets/ansible-test/collection-tests/coverage.sh4
-rwxr-xr-xtest/integration/targets/ansible-test/collection-tests/venv.sh4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/integration/targets/ansible-test/collection-tests/coverage.sh b/test/integration/targets/ansible-test/collection-tests/coverage.sh
index 033a9836ea..221ae66ab6 100755
--- a/test/integration/targets/ansible-test/collection-tests/coverage.sh
+++ b/test/integration/targets/ansible-test/collection-tests/coverage.sh
@@ -7,8 +7,8 @@ cd "${WORK_DIR}/ansible_collections/ns/col"
# rename the sanity ignore file to match the current ansible version and update import ignores with the python version
ansible_version="$(python -c 'import ansible.release; print(".".join(ansible.release.__version__.split(".")[:2]))')"
-if [ "${ANSIBLE_TEST_PYTHON_VERSION}" == "2.6" ]; then
- # Non-module/module_utils plugins are not checked on this remote-only Python versions
+if [[ "${ANSIBLE_TEST_PYTHON_VERSION}" =~ ^2\. ]] || [[ "${ANSIBLE_TEST_PYTHON_VERSION}" =~ ^3\.[567] ]]; then
+ # Non-module/module_utils plugins are not checked on these remote-only Python versions
sed "s/ import$/ import-${ANSIBLE_TEST_PYTHON_VERSION}/;" < "tests/sanity/ignore.txt" | grep -v 'plugins/[^m].* import' > "tests/sanity/ignore-${ansible_version}.txt"
else
sed "s/ import$/ import-${ANSIBLE_TEST_PYTHON_VERSION}/;" < "tests/sanity/ignore.txt" > "tests/sanity/ignore-${ansible_version}.txt"
diff --git a/test/integration/targets/ansible-test/collection-tests/venv.sh b/test/integration/targets/ansible-test/collection-tests/venv.sh
index ba0d2628d6..42dbfde41b 100755
--- a/test/integration/targets/ansible-test/collection-tests/venv.sh
+++ b/test/integration/targets/ansible-test/collection-tests/venv.sh
@@ -7,8 +7,8 @@ cd "${WORK_DIR}/ansible_collections/ns/col"
# rename the sanity ignore file to match the current ansible version and update import ignores with the python version
ansible_version="$(python -c 'import ansible.release; print(".".join(ansible.release.__version__.split(".")[:2]))')"
-if [ "${ANSIBLE_TEST_PYTHON_VERSION}" == "2.6" ]; then
- # Non-module/module_utils plugins are not checked on this remote-only Python versions
+if [[ "${ANSIBLE_TEST_PYTHON_VERSION}" =~ ^2\. ]] || [[ "${ANSIBLE_TEST_PYTHON_VERSION}" =~ ^3\.[567] ]]; then
+ # Non-module/module_utils plugins are not checked on these remote-only Python versions
sed "s/ import$/ import-${ANSIBLE_TEST_PYTHON_VERSION}/;" < "tests/sanity/ignore.txt" | grep -v 'plugins/[^m].* import' > "tests/sanity/ignore-${ansible_version}.txt"
else
sed "s/ import$/ import-${ANSIBLE_TEST_PYTHON_VERSION}/;" < "tests/sanity/ignore.txt" > "tests/sanity/ignore-${ansible_version}.txt"