mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
tests Makefile: add rules to run C tests iwth specific sanitizer
This commit is contained in:
parent
c7a86eecfd
commit
a6ce45ca87
1 changed files with 11 additions and 4 deletions
15
Makefile
15
Makefile
|
|
@ -25,7 +25,7 @@ minishell_objs = $(addsuffix .o,src/$(NAME)) $(objs)
|
|||
all_objs = $(minishell_objs)
|
||||
deps = $(all_objs:.o=.d)
|
||||
|
||||
.PHONY: all clean fclean re norm tests ctests
|
||||
.PHONY: all clean fclean re norm tests ctests ctestsa ctestsub ctestst
|
||||
|
||||
all: $(NAME)
|
||||
|
||||
|
|
@ -62,19 +62,26 @@ tests:
|
|||
@echo "Running tests with AddressSanitizer..."
|
||||
+CFLAGS="$(CFLAGS) $(ASAN)" make re
|
||||
shellspec
|
||||
+CFLAGS="$(CFLAGS) $(ASAN)" make ctests
|
||||
+make ctestsa
|
||||
|
||||
@echo "Running tests with UndefinedBehaviourSanitizer..."
|
||||
+CFLAGS="$(CFLAGS) $(UBSAN)" make re
|
||||
shellspec
|
||||
+CFLAGS="$(CFLAGS) $(UBTSAN)" make ctests
|
||||
+make ctestsub
|
||||
|
||||
@echo "Running tests with ThreadSanitizer..."
|
||||
+CFLAGS="$(CFLAGS) $(TSAN)" make re
|
||||
shellspec
|
||||
+CFLAGS="$(CFLAGS) $(TSAN)" make ctests
|
||||
+make ctestst
|
||||
|
||||
@echo "All tests passed!"
|
||||
|
||||
ctests: $(LIBFT)
|
||||
+make -C tests
|
||||
|
||||
ctestsa: CFLAGS += $(ASAN)
|
||||
ctestsa: ctests
|
||||
ctestsub: CFLAGS += $(UBSAN)
|
||||
ctestsub: ctests
|
||||
ctestst: CFLAGS += $(TSAN)
|
||||
ctestst: ctests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue