Files
docker-cli/components/engine/hack/make/test-integration-cli
Jörg Thalheim 64b904ff2d hack/make/test-integration-cli: introduce MAKEDIR variable
- every execution of dirname costs time
- less repeating

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: 6533cb973f6bab672018148fd6a67644580cc61f
Component: engine
2015-04-15 10:44:14 +02:00

32 lines
713 B
Bash

#!/bin/bash
set -e
DEST=$1
bundle_test_integration_cli() {
go_test_dir ./integration-cli
}
# subshell so that we can export PATH without breaking other things
(
source "${MAKEDIR}/.integration-daemon-start"
# 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 "${MAKEDIR}/.ensure-frozen-images"
source "${MAKEDIR}/.ensure-httpserver"
source "${MAKEDIR}/.ensure-emptyfs"
bundle_test_integration_cli
}; then
didFail=1
fi
source "${MAKEDIR}/.integration-daemon-stop"
[ -z "$didFail" ] # "set -e" ftw
) 2>&1 | tee -a "$DEST/test.log"