2014-01-06 11:12:37 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Exit on first error
|
2014-01-11 15:53:07 +01:00
|
|
|
set -ex
|
2014-01-06 11:12:37 +01:00
|
|
|
|
2014-01-19 20:55:28 +01:00
|
|
|
# Put Python eggs in a writeable directory
|
2014-01-11 15:52:37 +01:00
|
|
|
export PYTHON_EGG_CACHE="/tmp/.python-eggs"
|
|
|
|
|
2014-01-19 20:55:28 +01:00
|
|
|
# Activate correct virtualenv
|
2014-01-06 11:12:37 +01:00
|
|
|
TRAVIS_PYTHON_VERSION=$1
|
|
|
|
source /home/travis/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/activate
|
2014-01-19 20:55:28 +01:00
|
|
|
|
2014-01-06 11:12:37 +01:00
|
|
|
env
|
|
|
|
|
|
|
|
# Kill background processes on exit
|
2014-01-19 20:56:29 +01:00
|
|
|
trap 'kill -9 $(jobs -p)' SIGINT SIGTERM EXIT
|
2014-01-06 11:12:37 +01:00
|
|
|
|
|
|
|
# Start docker daemon
|
2014-01-16 17:50:52 +01:00
|
|
|
docker -d -H unix:///var/run/docker.sock 2>> /dev/null >> /dev/null &
|
2014-01-06 11:12:37 +01:00
|
|
|
sleep 2
|
|
|
|
|
|
|
|
# $init is set by sekexe
|
2014-01-19 21:39:21 +01:00
|
|
|
cd $(dirname $init)/.. && nosetests -v
|