fix constant issue, and make running of test program dependent on successful build

This commit is contained in:
2025-10-09 21:17:29 +02:00
parent 4942d959d5
commit 6e3211ab49
4 changed files with 11 additions and 9 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
CC := gcc
CFLAGS := -Wall -Wextra -Wno-override-init -O0 -g -fno-omit-frame-pointer -fno-inline
CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wno-override-init -O0 -g -fno-omit-frame-pointer -fno-inline
LDFLAGS := -lcriterion
TESTBIN := /tmp/all_tests
@@ -14,7 +14,7 @@ test:
echo "No test files found!"; \
else \
echo "Compiling all test files into $(TESTBIN)..."; \
$(CC) $(CFLAGS) _allocator_impl.c $$files -o $(TESTBIN) $(LDFLAGS); \
$(CC) $(CFLAGS) _allocator_impl.c $$files -o $(TESTBIN) $(LDFLAGS) || exit 1; \
echo "Running tests..."; \
valgrind $(TESTBIN); \
fi