diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2022-02-14 09:31:24 +0100 |
---|---|---|
committer | Jose M. Guisado <jguisado@soleta.eu> | 2022-02-14 10:06:15 +0100 |
commit | 9bfb511749f4d8488ca6673514a1cccd9a62ce79 (patch) | |
tree | a1a2554b02611f0e7384ec0d895eb7daed7a8679 /tests/run-test.sh | |
parent | 86beaee6e6fc602f170dc4a7efd205253b37142a (diff) |
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.
Diffstat (limited to 'tests/run-test.sh')
-rwxr-xr-x | tests/run-test.sh | 6 |
1 files changed, 5 insertions, 1 deletions
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) |