Wait one second between each kvm start to avoid hitting large number of
processes trying to start in parallel. This allows the VMs to be started
more efficiently for parallel-vm.py runs with large number of VMs.
Signed-off-by: Jouni Malinen <j@w1.fi>
vm = {}
for i in range(0, num_servers):
print("\rStarting virtual machine {}/{}".format(i + 1, num_servers)),
- cmd = ['./vm-run.sh', '--timestamp', str(timestamp),
+ cmd = ['./vm-run.sh', '--delay', str(i), '--timestamp', str(timestamp),
'--ext', 'srv.%d' % (i + 1),
'-i'] + codecov_args + extra_args
vm[i] = {}
DATE=$TIMESTAMP
CODECOV=no
TIMEWARP=0
+DELAY=0
CODECOV_DIR=
while [ "$1" != "" ]; do
case $1 in
--timewrap ) shift
TIMEWARP=1
;;
+ --delay ) shift
+ DELAY=$1
+ shift
+ ;;
* )
RUN_TEST_ARGS="$RUN_TEST_ARGS$1 "
shift
CODECOV=no
fi
+if [ $DELAY -gt 0 ]; then
+ echo "Wait $DELAY seconds before starting VM"
+ sleep $DELAY
+fi
+
echo "Starting test run in a virtual machine"
kvm \