certbot/tests/letstest/scripts/test_sdists.sh
Brad Warren 7f3c732bbf Cleanup test farm tests and add test_sdists (#4089)
* add get_certbot_version.sh

* Use get_certbot_version.sh in build.py

* make test_leauto_upgrades.sh more robust

* auto upgrades break tests

* OCSP experimental is not needed anymore

* Add test_sdists.sh

* Use LE_AUTO_VERSION, not repo version

* install OS deps earlier

* use readlink not realpath

* undo changes to build.py

* Factor out version code from build.py

* Use version.py in test_sdists

* Remove get_certbot_version

* workaround setuptools breakage
2017-01-30 19:37:23 -08:00

36 lines
816 B
Bash
Executable file

#!/bin/sh -xe
cd letsencrypt
./certbot-auto --os-packages-only -n --debug
PLUGINS="certbot-apache certbot-nginx"
PYTHON=$(command -v python2.7 || command -v python27 || command -v python2 || command -v python)
TEMP_DIR=$(mktemp -d)
VERSION=$(letsencrypt-auto-source/version.py)
# setup venv
virtualenv --no-site-packages -p $PYTHON --setuptools venv
. ./venv/bin/activate
pip install -U pip
pip install -U setuptools
# build sdists
for pkg_dir in acme . $PLUGINS; do
cd $pkg_dir
python setup.py clean
rm -rf build dist
python setup.py sdist
mv dist/* $TEMP_DIR
cd -
done
# test sdists
cd $TEMP_DIR
for pkg in acme certbot $PLUGINS; do
tar -xvf "$pkg-$VERSION.tar.gz"
cd "$pkg-$VERSION"
python setup.py build
python setup.py test
python setup.py install
cd -
done