From 923df644a08131f0f8aa117ffbd64451db27b6e6 Mon Sep 17 00:00:00 2001 From: Liam Waldron Date: Mon, 10 Mar 2025 22:26:24 -0400 Subject: [PATCH] UNIT TESTING WORKS --- Makefile | 7 ++++--- config.mk | 2 +- tests/Makefile | 9 --------- 3 files changed, 5 insertions(+), 13 deletions(-) delete mode 100644 tests/Makefile diff --git a/Makefile b/Makefile index 2e9eb0e..f1464e4 100644 --- a/Makefile +++ b/Makefile @@ -35,8 +35,9 @@ lib: $(SDIR)/libglacier.c $(CC) $(SDIR)/libglacier.c -c $(LIBFLAGS) -o $(BDIR)/lib/libglacier.o $(AR) -rc $(BDIR)/lib/libglacier.a build/lib/libglacier.o -test: $(BDIR) $(TDIR)/Makefile - make -f tests/Makefile +check: $(BDIR) $(TDIR)/unit-tests.c + $(CC) tests/unit-tests.c -o tests/test-suite -lcunit -Wall -Wextra build/lib/libglacier.a $(LIBFLAGS) + tests/test-suite install_lib: $(BDIR)/lib/libglacier.a @echo "[INFO]" @@ -64,5 +65,5 @@ install: install_lib install_head clean: rm -rf $(BDIR) -distclean: $(BDIR) $(TDIR)/test-suite +distclean: rm -rf $(BDIR) $(TDIR)/test-suite diff --git a/config.mk b/config.mk index 3f6419c..a459b40 100644 --- a/config.mk +++ b/config.mk @@ -5,6 +5,6 @@ CC = /bin/gcc AR = /bin/ar -LIBFLAGS = -lconfig +LIBFLAGS = -lconfig -lcrypto PREFIX = /usr diff --git a/tests/Makefile b/tests/Makefile deleted file mode 100644 index a34d67c..0000000 --- a/tests/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# -# Makefile -# - -include ../config.mk - -all: unit-tests.c - $(CC) unit-tests.c -o test-suite -lcunit -lconfig ../build/libglacier.a -Wall -Wextra - ./test-suite