From d85809d5924e3e5d76dc3fe2da0ace9e9134ec24 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 10 May 2021 09:36:24 -0700 Subject: [PATCH] Update Python versions used to run Windows tests. --- test/utils/shippable/incidental/windows.sh | 17 +++++++---------- test/utils/shippable/windows.sh | 17 +++++++---------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/test/utils/shippable/incidental/windows.sh b/test/utils/shippable/incidental/windows.sh index c168f92538d..ed9645e1cf6 100755 --- a/test/utils/shippable/incidental/windows.sh +++ b/test/utils/shippable/incidental/windows.sh @@ -13,14 +13,11 @@ stage="${S:-prod}" provider="${P:-default}" # python versions to test in order -# python 2.7 runs full tests while other versions run minimal tests -python_versions=( - 3.5 - 3.6 - 3.7 - 3.8 - 2.7 -) +IFS=' ' read -r -a python_versions <<< \ + "$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import util; print(" ".join(util.CONTROLLER_PYTHON_VERSIONS))')" + +# python version to run full tests on while other versions run minimal tests +python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import util; print(util.CONTROLLER_MIN_PYTHON_VERSION)')" # version to test when only testing a single version single_version=2012-R2 @@ -53,8 +50,8 @@ else fi for version in "${python_versions[@]}"; do - if [ "${version}" == "2.7" ]; then - # full tests for python 2.7 + if [ "${version}" == "${python_default}" ]; then + # full tests ci="${target}" else # minimal tests for other python versions diff --git a/test/utils/shippable/windows.sh b/test/utils/shippable/windows.sh index 549d6a80b55..1e768649591 100755 --- a/test/utils/shippable/windows.sh +++ b/test/utils/shippable/windows.sh @@ -14,14 +14,11 @@ stage="${S:-prod}" provider="${P:-default}" # python versions to test in order -# python 2.7 runs full tests while other versions run minimal tests -python_versions=( - 3.5 - 3.6 - 3.7 - 3.8 - 2.7 -) +IFS=' ' read -r -a python_versions <<< \ + "$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import util; print(" ".join(util.CONTROLLER_PYTHON_VERSIONS))')" + +# python version to run full tests on while other versions run minimal tests +python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import util; print(util.CONTROLLER_MIN_PYTHON_VERSION)')" # version to test when only testing a single version single_version=2012-R2 @@ -57,8 +54,8 @@ for version in "${python_versions[@]}"; do changed_all_target="all" changed_all_mode="default" - if [ "${version}" == "2.7" ]; then - # smoketest tests for python 2.7 + if [ "${version}" == "${python_default}" ]; then + # smoketest tests if [ "${CHANGED}" ]; then # with change detection enabled run tests for anything changed # use the smoketest tests for any change that triggers all tests