From 27f2b2305b12cfde904c79cda2e6bc787dadc7d7 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 25 Feb 2026 14:02:30 +0100 Subject: [PATCH 1/2] Fix calling proper Python interpreter. This commit also fixes calling proper Python interpreter for OpenShift 4 PyTest case. It also remove dead symlinks introduced by Disabling OpenSHift 4 PR. Signed-off-by: Petr "Stone" Hracek --- 2.5/test/run-openshift-remote-cluster | 1 - 2.5/test/test-lib-ruby.sh | 1 - 3.0/test/run-openshift-remote-cluster | 1 - 3.0/test/test-lib-ruby.sh | 1 - 3.3/test/run-openshift-remote-cluster | 1 - 3.3/test/test-lib-ruby.sh | 1 - test/run-openshift-pytest | 10 +++++++++- test/run-pytest | 9 ++++++--- 8 files changed, 15 insertions(+), 10 deletions(-) delete mode 120000 2.5/test/run-openshift-remote-cluster delete mode 120000 2.5/test/test-lib-ruby.sh delete mode 120000 3.0/test/run-openshift-remote-cluster delete mode 120000 3.0/test/test-lib-ruby.sh delete mode 120000 3.3/test/run-openshift-remote-cluster delete mode 120000 3.3/test/test-lib-ruby.sh diff --git a/2.5/test/run-openshift-remote-cluster b/2.5/test/run-openshift-remote-cluster deleted file mode 120000 index 1bffcba8..00000000 --- a/2.5/test/run-openshift-remote-cluster +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-remote-cluster \ No newline at end of file diff --git a/2.5/test/test-lib-ruby.sh b/2.5/test/test-lib-ruby.sh deleted file mode 120000 index ea235094..00000000 --- a/2.5/test/test-lib-ruby.sh +++ /dev/null @@ -1 +0,0 @@ -../../test/test-lib-ruby.sh \ No newline at end of file diff --git a/3.0/test/run-openshift-remote-cluster b/3.0/test/run-openshift-remote-cluster deleted file mode 120000 index 1bffcba8..00000000 --- a/3.0/test/run-openshift-remote-cluster +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-remote-cluster \ No newline at end of file diff --git a/3.0/test/test-lib-ruby.sh b/3.0/test/test-lib-ruby.sh deleted file mode 120000 index ea235094..00000000 --- a/3.0/test/test-lib-ruby.sh +++ /dev/null @@ -1 +0,0 @@ -../../test/test-lib-ruby.sh \ No newline at end of file diff --git a/3.3/test/run-openshift-remote-cluster b/3.3/test/run-openshift-remote-cluster deleted file mode 120000 index 1bffcba8..00000000 --- a/3.3/test/run-openshift-remote-cluster +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-remote-cluster \ No newline at end of file diff --git a/3.3/test/test-lib-ruby.sh b/3.3/test/test-lib-ruby.sh deleted file mode 120000 index ea235094..00000000 --- a/3.3/test/test-lib-ruby.sh +++ /dev/null @@ -1 +0,0 @@ -../../test/test-lib-ruby.sh \ No newline at end of file diff --git a/test/run-openshift-pytest b/test/run-openshift-pytest index 7ee86b6f..8282a699 100755 --- a/test/run-openshift-pytest +++ b/test/run-openshift-pytest @@ -8,4 +8,12 @@ THISDIR=$(dirname ${BASH_SOURCE[0]}) -cd "${THISDIR}" && python3.12 -m pytest -s -rA --showlocals -vv test_ocp_*.py +git show -s + +if python3 -c 'import sys; sys.exit(0 if sys.version_info < (3,13) else 1)'; then + PYTHON_VERSION="3.12" +else + PYTHON_VERSION="3" +fi + +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_ocp_*.py diff --git a/test/run-pytest b/test/run-pytest index 4615ea5a..fcd46f95 100755 --- a/test/run-pytest +++ b/test/run-pytest @@ -8,8 +8,11 @@ THISDIR=$(dirname ${BASH_SOURCE[0]}) -PYTHON_VERSION="3.12" -if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then - PYTHON_VERSION="3.13" +git show -s + +if python3 -c 'import sys; sys.exit(0 if sys.version_info < (3,13) else 1)'; then + PYTHON_VERSION="3.12" +else + PYTHON_VERSION="3" fi cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py From 5f14ba43bdfbf74201203a7f8e39907b91fff4ca Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 25 Feb 2026 14:41:06 +0100 Subject: [PATCH 2/2] Remove `git show -s` Signed-off-by: Petr "Stone" Hracek --- test/run-openshift-pytest | 2 -- test/run-pytest | 2 -- 2 files changed, 4 deletions(-) diff --git a/test/run-openshift-pytest b/test/run-openshift-pytest index 8282a699..32b928b6 100755 --- a/test/run-openshift-pytest +++ b/test/run-openshift-pytest @@ -8,8 +8,6 @@ THISDIR=$(dirname ${BASH_SOURCE[0]}) -git show -s - if python3 -c 'import sys; sys.exit(0 if sys.version_info < (3,13) else 1)'; then PYTHON_VERSION="3.12" else diff --git a/test/run-pytest b/test/run-pytest index fcd46f95..3757d742 100755 --- a/test/run-pytest +++ b/test/run-pytest @@ -8,8 +8,6 @@ THISDIR=$(dirname ${BASH_SOURCE[0]}) -git show -s - if python3 -c 'import sys; sys.exit(0 if sys.version_info < (3,13) else 1)'; then PYTHON_VERSION="3.12" else