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.
CC = cc
-CFLAGS = -Wall -Wextra -Werror -g
+CFLAGS = -Wall -Wextra -Werror -g -fdiagnostics-color=always
GNLDIR = ../
SRCDIR = src/
re : fclean
$(MAKE)
+
+norminette :
+ norminette $(GNLDIR)
git pull
+printf "Running Norminette\n"
+make norminette > tmp
+if [ $? -ne 0 ]
+then
+ printf "Norminette error:\n$(<tmp)\n"
+ rm tmp
+ exit 1
+fi
+printf "Compiling without externally providing BUFFER_SIZE\n"
+make --silent 2>tmp
+if [ $? -ne 0 ]
+then
+ printf "Compilation failed:\n$(<tmp)\n"
+ rm tmp
+ exit 1
+fi
+
mkdir -p correct
SEP="---------------------"
wait
mkdir -p results
testing_sizes=(1 2 3 4 10 16 42 100 200 500 1000 9999 10000000)
-printf "Compiling without externally providing BUFFER_SIZE\n"
-make --silent
+
wait
+
for file in $(ls test_files/)
do
valgrind --quiet --leak-check=full ./tester $file 2> tmp
fi
done
done
+
wait
rm tmp