Try installing the devel package when INSTALL_OR_SKIP is set

This commit is contained in:
Miro Hrončok 2022-11-25 14:20:23 +01:00
commit 4c3ed6ec49
2 changed files with 6 additions and 2 deletions

View file

@ -15,8 +15,9 @@ INSTALL_OR_SKIP=${INSTALL_OR_SKIP:-false}
workdir="$(mktemp --directory)"
cd "$workdir"
if [ "$INSTALL_OR_SKIP" == "true" ] && [ ! -f "/usr/bin/$PYTHON" ]; then
dnf -y install "/usr/bin/$PYTHON" || :
if [ "$INSTALL_OR_SKIP" == "true" ]; then
[ ! -f "/usr/bin/$PYTHON" ] && dnf -y install "/usr/bin/$PYTHON" || :
dnf -y install "$PYTHON-devel" || :
if [ ! -f "/usr/bin/$PYTHON" ]; then
echo "/usr/bin/$PYTHON not installable, skipping this test"
exit 0

View file

@ -48,6 +48,9 @@
- smoke34_optional:
dir: smoke
run: runuser testuser -c 'VERSION=3.4 METHOD=venv INSTALL_OR_SKIP=true ./venv.sh'
- smoke310_optional:
dir: smoke
run: runuser testuser -c 'VERSION=3.10 METHOD=venv TOX=false INSTALL_OR_SKIP=true ./venv.sh'
- smokepypy:
dir: smoke
run: runuser testuser -c 'VERSION=2.7 METHOD=virtualenv PYTHON=pypy ./venv.sh'