From 6dbb815c0350f454fbd79ed6ebcc829cbc524e5b Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Wed, 1 Apr 2020 13:24:08 +0200 Subject: Show testing duration when finished --- lib/actions/test.bash | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/actions/test.bash b/lib/actions/test.bash index 820a689..5b1fa0e 100644 --- a/lib/actions/test.bash +++ b/lib/actions/test.bash @@ -2,8 +2,9 @@ action() { local OPTIND - local raku local failures=0 + local init + local raku while getopts ":p:" opt do @@ -31,6 +32,10 @@ action() { set -- spectest modules fi + # Take note of the current time, so we can show how long it took later + # on + init="$(date +%s)" + # Run each test target for target in "$@" do @@ -45,6 +50,8 @@ action() { failures=$(( failures + 1 )) done + info "Testing took $(pp_duration "$init")" + if (( failures > 0 )) then return 4 -- cgit v1.1