github.com/raychaser/docker@v1.5.0/project/make/test-integration-cli (about) 1 #!/bin/bash 2 set -e 3 4 DEST=$1 5 6 bundle_test_integration_cli() { 7 go_test_dir ./integration-cli 8 } 9 10 # subshell so that we can export PATH without breaking other things 11 ( 12 source "$(dirname "$BASH_SOURCE")/.integration-daemon-start" 13 14 # we need to wrap up everything in between integration-daemon-start and 15 # integration-daemon-stop to make sure we kill the daemon and don't hang, 16 # even and especially on test failures 17 didFail= 18 if ! { 19 # pull the busybox image before running the tests 20 sleep 2 21 22 source "$(dirname "$BASH_SOURCE")/.ensure-busybox" 23 24 bundle_test_integration_cli 25 }; then 26 didFail=1 27 fi 28 29 source "$(dirname "$BASH_SOURCE")/.integration-daemon-stop" 30 31 [ -z "$didFail" ] # "set -e" ftw 32 ) 2>&1 | tee -a $DEST/test.log