From c26b64823bfc2c7724126f7194359aa6990b81d6 Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Jun 05 2020 09:42:43 +0000 Subject: Make it possible to run Python 3.4 tests optionally --- diff --git a/smoke/venv.sh b/smoke/venv.sh index d85f7b7..2864540 100755 --- a/smoke/venv.sh +++ b/smoke/venv.sh @@ -8,10 +8,19 @@ VERSION=${VERSION:-3.8} PYTHON=${PYTHON:-python$VERSION} METHOD=${METHOD:-venv} TOX=${TOX:-true} +INSTALL_OR_SKIP=${INSTALL_OR_SKIP:-false} # clean from possible older runs rm -rf venv .tox __pycache__ .pytest* test_*.py *.pyx *.c *.so ensurepiptestroot || : +if [ "$INSTALL_OR_SKIP" == "true" ] && [ ! -f "/usr/bin/$PYTHON" ]; then + dnf -y install "/usr/bin/$PYTHON" || : + if [ ! -f "/usr/bin/$PYTHON" ]; then + echo "/usr/bin/$PYTHON not installable, skipping this test" + exit 0 + fi +fi + # check the we can create the venv if [ "$METHOD" == "venv" ]; then $PYTHON -m venv venv diff --git a/tests.yml b/tests.yml index 63a8b78..7633e84 100644 --- a/tests.yml +++ b/tests.yml @@ -34,6 +34,9 @@ - smoke39: dir: smoke run: VERSION=3.9 METHOD=venv ./venv.sh + - smoke34_optional: + dir: smoke + run: VERSION=3.4 METHOD=venv INSTALL_OR_SKIP=true ./venv.sh - smokepypy: dir: smoke run: VERSION=2.7 METHOD=virtualenv PYTHON=pypy ./venv.sh @@ -50,6 +53,7 @@ dir: flags run: python3-debug ./assertflags.py -Og required_packages: + - dnf - gcc - virtualenv - python2.7