1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/project/make/test-integration-cli
Tianon Gravi 51b5dc185b Update emptyfs support to work properly if scratch is already an image
Also, this decouples the emptyfs script from the busybox one -- they're now functionally separate thanks to the scratch no-op change. 👍

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-20 16:26:04 -07:00

33 lines
787 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 "$(dirname "$BASH_SOURCE")/.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 ! {
# pull the busybox image before running the tests
sleep 2
source "$(dirname "$BASH_SOURCE")/.ensure-busybox"
source "$(dirname "$BASH_SOURCE")/.ensure-emptyfs"
bundle_test_integration_cli
}; then
didFail=1
fi
source "$(dirname "$BASH_SOURCE")/.integration-daemon-stop"
[ -z "$didFail" ] # "set -e" ftw
) 2>&1 | tee -a $DEST/test.log