Provision and destroy test VMs in the background.

This should help speed-up the build by provisioning test VMs while we run unit tests, and destroying them while we generate coverage reports.
This commit is contained in:
Marc CARRE committed 2017-02-08 14:15:59 +00:00
1 parent 67dbdd377c
commit dd935b7e9e
7 files changed
+141 -48

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
wait_for() {
local timeout=$1
local lock_file=$2
for i in $(seq 1 "$timeout"); do
[ -f "$lock_file" ] && echo "[$i seconds]: $lock_file found." && return
if ! ((i % 10)); then echo "[$i seconds]: Waiting for $lock_file to be created..."; fi
sleep 1
done
echo "Timed out waiting for test VMs to be ready. See details in: $TEST_VMS_SETUP_OUTPUT_FILE" >&2
exit 1
}