Update test_sdists to use new script

This commit is contained in:
Erica Portnoy 2020-08-12 17:56:21 -07:00
parent 474f23d402
commit f880d917dd
3 changed files with 10 additions and 35 deletions

View file

@ -193,5 +193,5 @@ fi
Bootstrap
cd $1
$2
cd $1 # REPO_ROOT
$2 # Call the venv setup script here so we don't have to activate Python36SCL in the parent

View file

@ -70,7 +70,7 @@ fi
if [ "$OS_TYPE" = "ubuntu" ] ; then
export SERVER="$BOULDER_URL"
"$venv3/bin/tox" -e apacheconftest
"venv3/bin/tox" -e apacheconftest
else
echo Not running hackish apache tests on $OS_TYPE
fi

View file

@ -2,43 +2,18 @@
cd letsencrypt
# If we're on a RHEL 6 based system, we can be confident Python is already
# installed because the package manager is written in Python.
if command -v python && [ $(python -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//') -eq 26 ]; then
# RHEL/CentOS 6 will need a special treatment, so we need to detect that environment
RUN_RHEL6_TESTS=1
fi
BOOTSTRAP_SCRIPT="tests/letstest/scripts/bootstrap_os_packages.sh"
VENV_PATH=venv3
letsencrypt-auto-source/letsencrypt-auto --install-only -n --debug
if [ "$RUN_RHEL6_TESTS" = 1 ]; then
# Enable the SCL Python 3.6 installed by letsencrypt-auto bootstrap
PATH="/opt/rh/rh-python36/root/usr/bin:$PATH"
fi
PLUGINS="certbot-apache certbot-nginx"
PYTHON_MAJOR_VERSION=$(/opt/eff.org/certbot/venv/bin/python --version 2>&1 | cut -d" " -f 2 | cut -d. -f1)
TEMP_DIR=$(mktemp -d)
if [ "$PYTHON_MAJOR_VERSION" = "3" ]; then
# Some distros like Fedora may only have an executable named python3 installed.
PYTHON_NAME="python3"
VENV_PATH="venv3"
VENV_SCRIPT="tools/venv3.py"
else
PYTHON_NAME="python"
VENV_SCRIPT="tools/venv.py"
VENV_PATH="venv"
fi
VERSION=$("$PYTHON_NAME" letsencrypt-auto-source/version.py)
# setup venv
CERTBOT_PIP_NO_BINARY=":all:" "$VENV_SCRIPT" --requirement letsencrypt-auto-source/pieces/dependency-requirements.txt
# bootstrap and setup venv
sudo $BOOTSTRAP_SCRIPT . "CERTBOT_PIP_NO_BINARY=:all: $VENV_SCRIPT --requirement letsencrypt-auto-source/pieces/dependency-requirements.txt"
. "$VENV_PATH/bin/activate"
# pytest is needed to run tests on some of our packages so we install a pinned version here.
tools/pip_install.py pytest
PLUGINS="certbot-apache certbot-nginx"
TEMP_DIR=$(mktemp -d)
# build sdists
for pkg_dir in acme certbot $PLUGINS; do
cd $pkg_dir