Skip to content

Commit

Permalink
add run_tests.sh script to run tests in all envs
Browse files Browse the repository at this point in the history
  • Loading branch information
eriktaubeneck committed Jan 23, 2015
1 parent c5796c9 commit 5878f3c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions run_tests.sh
@@ -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

0 comments on commit 5878f3c

Please sign in to comment.