From e4abf072c95fd41f0676e3c027858d64dc352cde Mon Sep 17 00:00:00 2001 From: Lukas Jiriste Date: Tue, 24 Oct 2023 12:14:11 +0200 Subject: [PATCH] Add norminette check and minor QoL changes Add norminette check as the first thing that runs with test. Use norminette check to exit test script when the check fails. Use make exit status to exit test script when compilation fails. Add -fdiagnostics-color=always flag for compiler errors to retain their formatting when redirected for later output. --- Makefile | 5 ++++- test | 22 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index dd82e4c..454df71 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ CC = cc -CFLAGS = -Wall -Wextra -Werror -g +CFLAGS = -Wall -Wextra -Werror -g -fdiagnostics-color=always GNLDIR = ../ SRCDIR = src/ @@ -43,3 +43,6 @@ fclean : clean re : fclean $(MAKE) + +norminette : + norminette $(GNLDIR) diff --git a/test b/test index 9072c09..e2005d3 100755 --- a/test +++ b/test @@ -2,6 +2,23 @@ git pull +printf "Running Norminette\n" +make norminette > tmp +if [ $? -ne 0 ] +then + printf "Norminette error:\n$(tmp +if [ $? -ne 0 ] +then + printf "Compilation failed:\n$( tmp @@ -58,5 +75,6 @@ do fi done done + wait rm tmp -- 2.30.2