]> git.ipfire.org Git - thirdparty/nftables.git/commit
tests/shell: record the test duration (wall time) in the result data
authorThomas Haller <thaller@redhat.com>
Wed, 6 Sep 2023 11:52:20 +0000 (13:52 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 7 Sep 2023 17:35:21 +0000 (19:35 +0200)
commit8f3893708c427d58c1b0a180d2e5e4ac3ab2e7ee
treeeaf9c974a551d444c84403cdad908d715d90e69a
parent34f87e82f38adaefb1db617a5d618ca7ab140733
tests/shell: record the test duration (wall time) in the result data

Runtimes are important. Add a way to find out how long tests took.

  $ ./tests/shell/run-tests.sh
  ...
  $ for d in /tmp/nft-test.latest.*/test-*/ ; do \
         printf '%10.2f  %s\n' \
                "$(sed '1!d' "$d/times")" \
                "$(cat "$d/name")" ; \
    done \
    | sort -n \
    | awk '{print $0; s+=$1} END{printf("%10.2f\n", s)}'

Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/helpers/test-wrapper.sh