From 9bfb511749f4d8488ca6673514a1cccd9a62ce79 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Mon, 14 Feb 2022 09:31:24 +0100 Subject: 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. --- tests/run-test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/run-test.sh b/tests/run-test.sh index afda064..28a0071 100755 --- a/tests/run-test.sh +++ b/tests/run-test.sh @@ -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) -- cgit v1.2.3-18-g5258