2014-02-25 16:17:48 +00:00
|
|
|
#!/bin/bash
|
2014-04-08 04:14:19 +00:00
|
|
|
set -e
|
2014-02-25 16:17:48 +00:00
|
|
|
|
|
|
|
DEST=$1
|
|
|
|
|
|
|
|
bundle_test_integration_cli() {
|
|
|
|
go_test_dir ./integration-cli
|
|
|
|
}
|
|
|
|
|
2014-04-08 05:10:40 +00:00
|
|
|
# subshell so that we can export PATH without breaking other things
|
|
|
|
(
|
2014-12-19 07:20:59 +00:00
|
|
|
source "$(dirname "$BASH_SOURCE")/.integration-daemon-start"
|
2014-04-29 04:22:31 +00:00
|
|
|
|
2015-01-14 04:09:11 +00:00
|
|
|
# we need to wrap up everything in between integration-daemon-start and
|
|
|
|
# integration-daemon-stop to make sure we kill the daemon and don't hang,
|
|
|
|
# even and especially on test failures
|
|
|
|
didFail=
|
|
|
|
if ! {
|
|
|
|
source "$(dirname "$BASH_SOURCE")/.ensure-busybox"
|
2015-01-20 20:53:24 +00:00
|
|
|
source "$(dirname "$BASH_SOURCE")/.ensure-emptyfs"
|
2014-04-12 00:49:49 +00:00
|
|
|
|
2015-01-14 04:09:11 +00:00
|
|
|
bundle_test_integration_cli
|
|
|
|
}; then
|
|
|
|
didFail=1
|
|
|
|
fi
|
2014-04-29 04:22:31 +00:00
|
|
|
|
2014-12-19 07:20:59 +00:00
|
|
|
source "$(dirname "$BASH_SOURCE")/.integration-daemon-stop"
|
2015-01-14 04:09:11 +00:00
|
|
|
|
|
|
|
[ -z "$didFail" ] # "set -e" ftw
|
2015-01-10 00:28:40 +00:00
|
|
|
) 2>&1 | tee -a $DEST/test.log
|