Skip to contentSkip to conversation

tests: monitor: Summarize failures per test case

PATCH In review Phil Sutter 1 participant 2 messages Jul 20, 2023 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 tests: monitor: Summarize failures per test case

Explicitly print when tests from a file fail in addition to the diff + "output differs" message.

---
 tests/monitor/run-tests.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
tests/monitor/run-tests.sh +8 -1
index b5ca47d9838e4..f1ac790acf80c 100755
@@ -161,7 +161,10 @@ for variant in $variants; do
 	output_append=${variant}_output_append
 
 	for testcase in ${testcases:-testcases/*.t}; do
-		echo "$variant: running tests from file $(basename $testcase)"
+		filename=$(basename $testcase)
+		echo "$variant: running tests from file $filename"
+		rc_start=$rc
+
 		# files are like this:
 		#
 		# I add table ip t
@@ -199,6 +202,10 @@ for variant in $variants; do
 			$run_test
 			let "rc += $?"
 		}
+
+		let "rc_diff = rc - rc_start"
+		[[ $rc_diff -ne 0 ]] && \
+			echo "$variant: $rc_diff tests from file $filename failed"
 	done
 done
 exit $rc
Signature · 1 line
2.40.0