Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add run_tests.sh script to run tests in all envs
- Loading branch information
1 parent
c5796c9
commit 5878f3c
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# This script runs the tests in Python 2.7, Python 3.4, and PyPy | ||
# a virtualenv for each of these, repectively, should be avaiable at | ||
# venv, venv3, and venvpypy | ||
if [[ "$VIRTUAL_ENV" != "" ]] | ||
then | ||
deactivate | ||
fi | ||
|
||
EXITCODE=0 | ||
|
||
venv/bin/nosetests | ||
PYYTHON2_EXITCODE=$? | ||
venv3/bin/nosetests | ||
PYTHON3_EXITCODE=$? | ||
venvpypy/bin/nosetests | ||
PYPY_EXITCODE=$? | ||
|
||
if [[ $PYTHON2_EXITCODE != 0 ]] | ||
then | ||
echo 'python 2.7 tests failed' | ||
EXITCODE=$PYTHON2_EXITCODE | ||
fi | ||
if [[ $PYTHON3_EXITCODE != 0 ]] | ||
then | ||
echo 'python 3.4 tests failed' | ||
EXITCODE=$PYTHON3_EXITCODE | ||
fi | ||
if [[ $PYPY_EXITCODE != 0 ]] | ||
then | ||
echo 'pypy tests failed' | ||
EXITCODE=$PYPY_EXITCODE | ||
fi | ||
exit $EXITCODE |