aboutsummaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-08-29 16:44:07 +0000
committerOmar Polo <op@omarpolo.com>2022-08-29 16:44:07 +0000
commit5df699d1ab09618573bc4d076dfb3c4b3a78b4b4 (patch)
tree92ba623bdb7d3b22767f82f854dc89f7b64f8482 /regress
parent39ad4b8d7fc18e6c478dd41a4e5e6939842c66e8 (diff)
count ran/failed tests number
Diffstat (limited to 'regress')
-rw-r--r--regress/lib.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/regress/lib.sh b/regress/lib.sh
index fb6d046..26b79ac 100644
--- a/regress/lib.sh
+++ b/regress/lib.sh
@@ -1,3 +1,5 @@
+ran_no=0
+failed_no=0
failed=
gg="./../gg"
@@ -15,12 +17,15 @@ port $port
body=
dont_check_server_alive=no
+ ran_no=$((ran_no + 1))
+
current_test=$1
rm -f reg.conf
if ! $1; then
echo "$1 failed"
failed="$failed $1"
+ failed_no=$((failed_no + 1))
else
echo "$1 passed"
fi
@@ -32,10 +37,14 @@ port $port
if ! check; then
echo "gmid crashed?"
failed="$failed $1"
+ failed_no=$((failed_no + 1))
fi
}
tests_done() {
+ ok=$((ran_no - failed_no))
+ echo
+ echo "tests: $ran_no / passed: $ok / failed: $failed_no"
if [ "$failed" != "" ]; then
echo
echo "failed tests:$failed"