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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-05-15 17:50:51 +03:00
parent 7e49399b6f
commit 76f999b01d

View file

@ -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