From 3e741297fef8b74fc3fd5c775279b28eeee9d203 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <vital.had@gmail.com>
Date: Fri, 28 Oct 2022 21:11:38 +0800
Subject: [PATCH 7/8] runtests: tests should exit with an error code if they
 fail

---
 tests/runtests | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/runtests b/tests/runtests
index da9ff84..b93f6a0 100755
--- a/tests/runtests
+++ b/tests/runtests
@@ -71,6 +71,7 @@ run () {
   echo >&2 "                  / of which $hmakeok known / $hmakebad bad"
   echo >&2 "$outok outputs match / $outbad outputs differ"
   echo >&2 "$errok errors  match / $errbad errors  differ"
+  if [[ $outbad -gt 0 || $errbad -gt 0 || $hmakebad -gt 0 ]]; then exit 1; fi
 }
 
 clean () {
-- 
2.36.1

