diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-11-16 14:17:05 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-11-16 15:11:25 +0100 |
commit | 7d8c2fb9168713ebadd6c7e0bada60a85235b64b (patch) | |
tree | fecf7d65aaf7ad471bbc36d574f5e0bc72271600 | |
parent | 25dab96205221b595968f4b88b7a26bf69282b26 (diff) | |
download | passt-7d8c2fb9168713ebadd6c7e0bada60a85235b64b.tar passt-7d8c2fb9168713ebadd6c7e0bada60a85235b64b.tar.gz passt-7d8c2fb9168713ebadd6c7e0bada60a85235b64b.tar.bz2 passt-7d8c2fb9168713ebadd6c7e0bada60a85235b64b.tar.lz passt-7d8c2fb9168713ebadd6c7e0bada60a85235b64b.tar.xz passt-7d8c2fb9168713ebadd6c7e0bada60a85235b64b.tar.zst passt-7d8c2fb9168713ebadd6c7e0bada60a85235b64b.zip |
test/lib/test: Clean up iperf3 JSON files before starting the server
...instead of doing it after the test. Now that we have pre-built
guest images, we might also have old JSON files from previous,
interrupted test runs.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-x | test/lib/test | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/test b/test/lib/test index df32178..29612c2 100755 --- a/test/lib/test +++ b/test/lib/test @@ -31,6 +31,8 @@ test_iperf3() { __procs="$((${1} - 1))"; shift __time="${1}"; shift + pane_or_context_run "${__sctx}" 'rm -f s*.json' + pane_or_context_run_bg "${__sctx}" \ 'for i in $(seq 0 '${__procs}'); do' \ ' (iperf3 -s1J -p'${__port}' -i'${__time} \ @@ -64,8 +66,6 @@ test_iperf3() { __bw=$(pane_or_context_output "${__sctx}" \ 'cat s*.json | jq -rMs "map('${__jval}') | add"') - pane_or_context_run "${__sctx}" \ - 'for i in $(seq 0 '${__procs}'); do rm s${i}.json; done' TEST_ONE_subs="$(list_add_pair "${TEST_ONE_subs}" "__${__var}__" "${__bw}" )" |