From 15752e8cf4eb95e463e496de44e005a8b6b24ca8 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Tue, 3 Sep 2013 18:24:37 -0400 Subject: tests: return a useful error code from the test harness With this patch the test harness returns 0 if there were no errors or failures detected, positive values if a error or failure was detected. Signed-off-by: Paul Moore --- tests/regression | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/regression b/tests/regression index 6e3d6d1..c1d7303 100755 --- a/tests/regression +++ b/tests/regression @@ -825,4 +825,8 @@ echo "============================================================" >&$logfd # cleanup and exit rm -f $tmpfile -exit 0 +rc=0 +[[ $stats_failure -gt 0 ]] && rc=$(($rc + 2)) +[[ $stats_error -gt 0 ]] && rc=$(($rc + 4)) + +exit $rc -- cgit v1.2.1