From 41a9edbfb28967eb2e0ea2a565d7df31fba5559f Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 26 Nov 2015 11:42:55 +0100 Subject: [PATCH] B2D_CACHE can be used to speedup integration tests Signed-off-by: David Gageot --- test/integration/run-bats.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/integration/run-bats.sh b/test/integration/run-bats.sh index b889b8540c..f3390f3ce5 100755 --- a/test/integration/run-bats.sh +++ b/test/integration/run-bats.sh @@ -97,9 +97,13 @@ export -f machine cleanup_machines cleanup_store -if [[ "$B2D_CACHE" == "1" ]] && [[ -f $B2D_LOCATION ]]; then - mkdir -p "${MACHINE_STORAGE_PATH}/cache" - cp $B2D_LOCATION "${MACHINE_STORAGE_PATH}/cache/boot2docker.iso" +if [[ -f "$B2D_LOCATION" ]]; then + if [[ "$B2D_CACHE" == "1" ]]; then + mkdir -p "${MACHINE_STORAGE_PATH}/cache" + cp $B2D_LOCATION "${MACHINE_STORAGE_PATH}/cache/boot2docker.iso" + else + echo "INFO: Run the tests with B2D_CACHE=1 to avoid downloading the boot2docker iso each time." + fi fi run_bats "$BATS_FILE"