From: Jouni Malinen Date: Thu, 15 May 2014 14:50:51 +0000 (+0300) Subject: tests: Show number of remaining parallel VMs X-Git-Tag: hostap_2_2~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76f999b01d685cf74b457318e9f78446ed16f61e;p=thirdparty%2Fhostap.git tests: Show number of remaining parallel VMs Make the parallel-vm.sh output a bit more helpful by showing a count of running VMs. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/vm/parallel-vm.sh b/tests/hwsim/vm/parallel-vm.sh index 9496493b3..9074b82e5 100755 --- a/tests/hwsim/vm/parallel-vm.sh +++ b/tests/hwsim/vm/parallel-vm.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd "$(dirname $0)" @@ -14,13 +14,20 @@ mkdir -p $LOGS DATE=$(date +%s) for i in `seq 1 $NUM`; do - echo "Starting virtual machine $i/$NUM" + printf "\rStarting virtual machine $i/$NUM" ./vm-run.sh --ext srv.$i --split $i/$NUM $* >> $LOGS/parallel-$DATE.srv.$i 2>&1 & done +echo echo "Waiting for virtual machines to complete testing" -wait -echo "Testing completed" +count=$NUM +for i in `seq 1 $NUM`; do + printf "\r$count VM(s) remaining " + wait -n + count=$((count-1)) +done +printf "\rTesting completed " +echo echo -n "PASS count: " grep ^PASS $LOGS/parallel-$DATE.srv.* | wc -l