diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2024-05-13 20:44:07 +0200 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2024-05-13 22:01:09 +0200 |
commit | 10eb77f9323110c55f88195c5b8207eb524baa73 (patch) | |
tree | 940c83fc095bad3e63045bc6fbe9ada8e4276135 /Makefile | |
parent | 0effd40bad7ae753102e7040159afd76be4e8732 (diff) |
add unit tests
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -33,8 +33,9 @@ LDFLAGS_DEPS != pkg-config --libs kcgi kcgi-html CFLAGS=-DLOG_INFO $(CFLAGS_DEPS) LDFLAGS=-static $(LDFLAGS_DEPS) -.if make(debug) -CFLAGS+=-O0 -g -W -Wall -Wextra -DTEMPLATE_DIR='"template"' +.if make(debug) || make(test) +PWD!=pwd +CFLAGS+=-O0 -g -W -Wall -Wextra -DDATA_DIR='"$(PWD)/test-data"' -DTEMPLATE_DIR='"template"' .else CFLAGS+=-O2 .endif @@ -49,6 +50,9 @@ all: main main: mime.o url.o template.o file.o http.o download.o browse.o main.o $(CC) -o $@ $> $(LDFLAGS) +test: mime.o url.o template.o file.o http.o download.o browse.o test.o + $(CC) -o $@ $> $(LDFLAGS) + env: env.o $(CC) -o $@ $> $(LDFLAGS) @@ -72,7 +76,7 @@ install: gzip -fk /var/www/vault-static/fontawesome-6.5.1/webfonts/fa-solid-900.woff2 clean: - rm -f *.o *.BAK main + rm -f *.o *.BAK main test links: links http://localhost/cgi-bin/vault |