Skip to content

Commit 98db97e

Browse files
committed
tests: Fix pythonwrap-copy-test to skip non-installed interpreters
1 parent 5d01967 commit 98db97e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

tests/pythonwrap-copy-test

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ echo "${TEST_NAME} -- test whether Python wrapper works when copied (instead of
44

55
set -- ${PYTHON_IMPLS}
66

7-
if [ ${#} -lt 1 ]; then
8-
echo 'No Python implementation supported (?!)' >&2
9-
do_exit 77
10-
fi
7+
while true; do
8+
if [ ${#} -lt 1 ]; then
9+
echo 'No Python implementation installed (?!)' >&2
10+
do_exit 77
11+
fi
12+
13+
# we have to have the proper Python version installed
14+
if "${1}" --version >&2; then
15+
break
16+
fi
17+
shift
18+
done
1119

1220
export EPYTHON=${1}
1321

0 commit comments

Comments
 (0)