Merge pull request #2425 from dgageot/pro-tip

B2D_CACHE can be used to speedup integration tests
This commit is contained in:
Jean-Laurent de Morlhon 2015-11-26 11:54:31 +01:00
commit 03abd8575a
1 changed files with 7 additions and 3 deletions

View File

@ -97,9 +97,13 @@ export -f machine
cleanup_machines
cleanup_store
if [[ "$B2D_CACHE" == "1" ]] && [[ -f $B2D_LOCATION ]]; then
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"