From 96f519b36ff3870aa8a50ba6a0e43547d19d9d99 Mon Sep 17 00:00:00 2001 From: Jean-Laurent de Morlhon Date: Wed, 18 Nov 2015 12:01:00 +0100 Subject: [PATCH] Copy once b2d iso prior to testing Signed-off-by: Jean-Laurent de Morlhon --- test/integration/run-bats.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/integration/run-bats.sh b/test/integration/run-bats.sh index 96072e0f22..15068d4718 100755 --- a/test/integration/run-bats.sh +++ b/test/integration/run-bats.sh @@ -66,6 +66,7 @@ export NAME="bats-$DRIVER-test" export MACHINE_STORAGE_PATH="/tmp/machine-bats-test-$DRIVER" export MACHINE_BIN_NAME=docker-machine export BATS_LOG="$MACHINE_ROOT/bats.log" +B2D_LOCATION=~/.docker/machine/cache/boot2docker.iso # This function gets used in the integration tests, so export it. export -f machine @@ -78,6 +79,11 @@ if [[ -d "$MACHINE_STORAGE_PATH" ]]; then rm -r "$MACHINE_STORAGE_PATH" fi +if [[ "$b2dcache" == "1" ]] && [[ -f $B2D_LOCATION ]]; then + mkdir -p "${MACHINE_STORAGE_PATH}/cache" + cp $B2D_LOCATION "${MACHINE_STORAGE_PATH}/cache/boot2docker.iso" +fi + run_bats "$BATS_FILE" if [[ -d "$MACHINE_STORAGE_PATH" ]]; then