|
Pierre-Yves Chibon |
a403cf |
set -e
|
|
Pierre-Yves Chibon |
a403cf |
|
|
Pierre-Yves Chibon |
781323 |
if [ -n "$REPO" -a -n "$BRANCH" ]; then
|
|
Pierre-Yves Chibon |
781323 |
git remote rm proposed || true
|
|
Pierre-Yves Chibon |
781323 |
git gc --auto
|
|
Pierre-Yves Chibon |
781323 |
git remote add proposed "$REPO"
|
|
Pierre-Yves Chibon |
781323 |
git fetch proposed
|
|
Pierre-Yves Chibon |
781323 |
git checkout origin/master
|
|
Pierre-Yves Chibon |
781323 |
git config --global user.email "you@example.com"
|
|
Pierre-Yves Chibon |
781323 |
git config --global user.name "Your Name"
|
|
Pierre-Yves Chibon |
781323 |
git merge --no-ff "proposed/$BRANCH" -m "Merge PR"
|
|
Pierre-Yves Chibon |
9ee9ee |
|
|
Pierre-Yves Chibon |
9ee9ee |
echo "Running tests for branch $BRANCH of repo $REPO"
|
|
Pierre-Yves Chibon |
b83373 |
echo "Last commits:"
|
|
Pierre-Yves Chibon |
b83373 |
git log -2
|
|
Pierre-Yves Chibon |
781323 |
fi
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
781323 |
DATE=`date +%Y%m%d`
|
|
Pierre-Yves Chibon |
781323 |
HASH=`sha1sum requirements.txt | awk '{print $1}'`
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
781323 |
if [ ! -d pagureenv-$DATE-$HASH ];
|
|
Pierre-Yves Chibon |
781323 |
then
|
|
Pierre-Yves Chibon |
781323 |
rm -rf pagureenv*;
|
|
Pierre-Yves Chibon |
781323 |
virtualenv pagureenv-$DATE-$HASH --system-site-packages
|
|
Pierre-Yves Chibon |
781323 |
source pagureenv-$DATE-$HASH/bin/activate
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
781323 |
pip install pip --upgrade
|
|
Pierre-Yves Chibon |
781323 |
# Needed within the venv
|
|
Pierre-Yves Chibon |
781323 |
pip install nose --upgrade
|
|
Pierre-Yves Chibon |
781323 |
pip install --upgrade --force-reinstall python-fedora 'setuptools>=17.1' pygments
|
|
Pierre-Yves Chibon |
781323 |
pip install -r tests_requirements.txt
|
|
Pierre-Yves Chibon |
49bf72 |
pip install -r requirements-ev.txt # We have one test on the SSE server
|
|
Pierre-Yves Chibon |
781323 |
sed -i -e 's|pygit2 >= 0.20.1||' requirements.txt
|
|
Pierre-Yves Chibon |
781323 |
pip install -r requirements.txt
|
|
Pierre-Yves Chibon |
781323 |
pip install psycopg2
|
|
Pierre-Yves Chibon |
781323 |
pip install python-openid python-openid-teams python-openid-cla
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
781323 |
pip uninstall cffi -y
|
|
Pierre-Yves Chibon |
781323 |
else
|
|
Pierre-Yves Chibon |
781323 |
source pagureenv-$DATE-$HASH/bin/activate
|
|
Pierre-Yves Chibon |
781323 |
fi
|
|
Pierre-Yves Chibon |
b1bbd1 |
trap deactivate SIGINT SIGTERM EXIT
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
781323 |
# Reload where the nosetests app is (within the venv)
|
|
Pierre-Yves Chibon |
781323 |
hash -r
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
51c7db |
|
|
Pierre-Yves Chibon |
781323 |
python setup.py build
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
bfc8ce |
PAGURE_CONFIG=`pwd`/tests/test_config \
|
|
Pierre-Yves Chibon |
bfc8ce |
PYTHONPATH=pagure \
|
|
Pierre-Yves Chibon |
bfc8ce |
./nosetests -v --with-xcoverage --cover-erase --cover-package=pagure
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
4f6f98 |
set +e
|
|
Pierre-Yves Chibon |
781323 |
|
|
Pierre-Yves Chibon |
4f6f98 |
PYTHONPATH=pagure pylint -f parseable pagure | tee pylint.out
|
|
Pierre-Yves Chibon |
4f6f98 |
pep8 pagure/*.py pagure/*/*.py | tee pep8.out
|
|
Pierre-Yves Chibon |
8d1443 |
|