scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 1ed0ff0000999561feee336c289252faf2502a7e
parent 00bae5c394c9b1d31586ffa1ee2f77a3edcc6f0a
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Wed, 29 Oct 2025 10:57:06 +0100

tests: Set error code

Having a correct error code when make tests is executed helps to detect
when a test failed.

Diffstat:
Mtests/Makefile | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile @@ -15,11 +15,15 @@ PROJECTDIR = .. include $(PROJECTDIR)/scripts/rules.mk all: - @for i in $(DIRS);\ + @trap 'rm -f $$$$.tmp' EXIT INT HUP TERM;\ + for i in $(DIRS);\ do \ cd $$i;\ $(MAKE) tests;\ cd -;\ - done | grep -e PASS -e FAIL -e SKIP;\ + done | \ + grep -e PASS -e FAIL -e SKIP |\ + tee $$$$.tmp &&\ + grep FAIL $$$$.tmp > /dev/null && exit 1 || exit 0 dep: