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