From: Lukas Jiriste Date: Tue, 24 Oct 2023 10:14:11 +0000 (+0200) Subject: Add norminette check and minor QoL changes X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=e4abf072c95fd41f0676e3c027858d64dc352cde;p=42%2Fgnl_tester.git 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. --- 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