For some 2.6 test PYTHON needs to be set to pytest

This commit is contained in:
rocky
2022-08-23 08:11:06 -04:00
parent d73d0dd11a
commit 9da3e4b3c0
2 changed files with 6 additions and 6 deletions

View File

@@ -7,9 +7,7 @@ SKIP_TESTS=(
# assert 0 # shouldn't reach here.
[test_shutil.py]=1
[test___all__.py]=1 # it fails on its own
[test___all__.py]=1 # it fails on its own
[test_aepack.py]=1 # Fails on its own
[test_aepack.py]=1 # it fails on its own
[test_al.py]=1 # it fails on its own
[test_anydbm.py]=1 # it fails on its own
@@ -59,7 +57,7 @@ SKIP_TESTS=(
[test_ossaudiodev.py]=1 # it fails on its own
[test_pep277.py]=1 # it fails on its own
[test_pyclbr.py]=1 # Investigate
[test_pyclbr.py]=1 # it fails on its own
[test_py3kwarn.py]=1 # it fails on its own
[test_scriptpackages.py]=1 # it fails on its own
@@ -85,7 +83,6 @@ SKIP_TESTS=(
[test_zipimport_support.py]=1
[test_zipfile64.py]=1 # Skip Long test
[test_zlib.py]=1 #
# .pyenv/versions/2.6.9/lib/python2.6/lib2to3/refactor.pyc
# .pyenv/versions/2.6.9/lib/python2.6/pyclbr.pyc
)

View File

@@ -1,6 +1,9 @@
#!/bin/bash
me=${BASH_SOURCE[0]}
# Note: for 2.6 sometimes we need to set PYTHON=pytest
PYTHON=${PYTHON:-python}
typeset -i BATCH=${BATCH:-0}
if (( ! BATCH )) ; then
isatty=$(/usr/bin/tty 2>/dev/null)
@@ -191,7 +194,7 @@ for file in $files; do
if [ ! -r $file ]; then
echo "Skipping test $file -- not readable. Does it exist?"
continue
elif ! python $file >/dev/null 2>&1 ; then
elif ! $PYTHON $file >/dev/null 2>&1 ; then
echo "Skipping test $file -- it fails on its own"
continue
fi
@@ -214,7 +217,7 @@ for file in $files; do
rc=$?
if (( rc == 0 )) ; then
echo ========== $(date +%X) Running $file ===========
timeout_cmd python $file
timeout_cmd $PYTHON $file
rc=$?
else
echo ======= Skipping $file due to compile/decompile errors ========