github.com/eikeon/docker@v1.5.0-rc4/project/make/test-docker-py (about) 1 #!/bin/bash 2 set -e 3 4 DEST=$1 5 6 # subshell so that we can export PATH without breaking other things 7 ( 8 source "$(dirname "$BASH_SOURCE")/.integration-daemon-start" 9 10 # we need to wrap up everything in between integration-daemon-start and 11 # integration-daemon-stop to make sure we kill the daemon and don't hang, 12 # even and especially on test failures 13 didFail= 14 if ! { 15 dockerPy='/docker-py' 16 [ -d "$dockerPy" ] || { 17 dockerPy="$DEST/docker-py" 18 git clone https://github.com/docker/docker-py.git "$dockerPy" 19 } 20 21 export PYTHONPATH="$dockerPy" # import "docker" from our local docker-py 22 python "$dockerPy/tests/integration_test.py" 23 }; then 24 didFail=1 25 fi 26 27 source "$(dirname "$BASH_SOURCE")/.integration-daemon-stop" 28 29 [ -z "$didFail" ] # "set -e" ftw 30 ) 2>&1 | tee -a $DEST/test.log