tests: add optional parameter for clients number

Test can be run with an optional number, this number indicates how many
client processes to run. Eg: ./run-tests.sh 50

Defaults to 18 clients when no parameter is supplied.

Also, wait for shell jobs to finish before exit.
master
Jose M. Guisado 2022-02-14 09:31:24 +01:00
parent 86beaee6e6
commit 9bfb511749
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,8 @@
for ((i=1;i<=18;i++))
NUM_CLIENTS=${1:-18}
for ((i=1;i<=NUM_CLIENTS;i++))
do
ip netns exec c$i .././tiptorrent-client 10.141.10.1 TEST &
done
wait $(jobs -p)