tests: Add scripts to allow parallel execution of tests in VMs
"parallel-vm.sh <number of VMs> [arguments..]" can now be used to run multiple VMs in parallel to speed up full test cycle significantly. In addition, the "--split srv/total" argument used in this design would also make it possible to split this to multiple servers to speed up testing. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
0df965e975
commit
09e38c2fce
4 changed files with 53 additions and 1 deletions
27
tests/hwsim/vm/parallel-vm.sh
Executable file
27
tests/hwsim/vm/parallel-vm.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd "$(dirname $0)"
|
||||
|
||||
NUM=$1
|
||||
if [ -z "$NUM" ]; then
|
||||
echo "usage: $0 <num servers> [params..]"
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
|
||||
LOGS=/tmp/hwsim-test-logs
|
||||
mkdir -p $LOGS
|
||||
DATE=$(date +%s)
|
||||
|
||||
for i in `seq 1 $NUM`; do
|
||||
echo "Starting virtual machine $i/$NUM"
|
||||
./vm-run.sh --ext srv.$i --split $i/$NUM $* >> $LOGS/parallel-$DATE.srv.$i 2>&1 &
|
||||
done
|
||||
|
||||
echo "Waiting for virtual machines to complete testing"
|
||||
wait
|
||||
echo "Testing completed"
|
||||
|
||||
echo -n "PASS count: "
|
||||
grep ^PASS $LOGS/parallel-$DATE.srv.* | wc -l
|
||||
cat $LOGS/parallel-$DATE.srv.* | grep FAIL | sort
|
Loading…
Add table
Add a link
Reference in a new issue