Skip to content

Commit

Permalink
Use local environment. Update on demand
Browse files Browse the repository at this point in the history
  • Loading branch information
kmmbvnr committed May 30, 2010
1 parent e76ecda commit d2973a2
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
#!/bin/bash -e
#!/bin/bash

SCRIPT_DIR=`dirname $0`
DEST_DIR=`mktemp -t -d ci-django-fsm-XXX`
ROOT_DIR=`cd $SCRIPT_DIR/.. && pwd`

cd $SCRIPT_DIR/../
ENVSPEC=`stat -c %Y $ROOT_DIR/tests/environment.pip`
ENVTIME=`test -d $ROOT_DIR/.ve && stat -c %Y $ROOT_DIR/.ve`

# Setup environment
virtualenv --no-site-packages $DEST_DIR
source $DEST_DIR/bin/activate
set -e

pip install -r tests/environment.pip
if [ $ENVSPEC -gt 0$ENVTIME ]; then
# Setup environment
virtualenv --no-site-packages $ROOT_DIR/.ve
source $ROOT_DIR/.ve/bin/activate
pip install -r $ROOT_DIR/tests/environment.pip
touch $ROOT_DIR/.ve
else
source $ROOT_DIR/.ve/bin/activate
fi

# Run tests
python <<EOF
Expand Down

0 comments on commit d2973a2

Please sign in to comment.