tests: more clear output log

This commit is contained in:
Khaïs COLIN 2025-02-13 17:32:51 +01:00
parent c5eaa0e126
commit 871571e258
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo

View file

@ -4,6 +4,9 @@ rawtests = \
test_env_manip \ test_env_manip \
metacharacters \ metacharacters \
ifeq ($(CFLAGS),)
CFLAGS = -Wall -Wextra -Werror -g
endif
tests = $(addprefix test_,$(rawtests)) tests = $(addprefix test_,$(rawtests))
test_objs = $(addsuffix .o,$(tests)) test_objs = $(addsuffix .o,$(tests))
objs := $(addprefix ../,$(objs)) testutil.o objs := $(addprefix ../,$(objs)) testutil.o
@ -19,8 +22,9 @@ LINCLUDE = -L$(LIBFTDIR)
.PHONY: run .PHONY: run
.NOTPARALLEL: run
run: $(tests) run: $(tests)
$(addprefix ./,$(addsuffix &&,$(tests))) echo "Finished running C tests" @echo "Finished running C tests"
-include $(deps) -include $(deps)
@ -30,6 +34,10 @@ run: $(tests)
test_%: %.o $(objs) test_%: %.o $(objs)
$(CC) $(CFLAGS) -o $@ $*.o $(objs) $(LINCLUDE) $(LDLIBS) $(CC) $(CFLAGS) -o $@ $*.o $(objs) $(LINCLUDE) $(LDLIBS)
@echo
@echo "====== Now running test: $@ ======"
@echo
./$@
fclean: fclean:
rm -f $(tests) rm -f $(tests)