diff options
Diffstat (limited to 'tests/Makefile.localtest')
-rw-r--r-- | tests/Makefile.localtest | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/Makefile.localtest b/tests/Makefile.localtest new file mode 100644 index 0000000..29a62f3 --- /dev/null +++ b/tests/Makefile.localtest @@ -0,0 +1,30 @@ +# +# Makefile to run tests with system binaries +# USE: make -f Makefile.localtest tests CRYPTSETUP_PATH=/sbin +# +CPPFLAGS=-I../lib/ -I../lib/luks1 -DHAVE_DECL_DM_TASK_RETRY_REMOVE -DKERNEL_KEYRING -DHAVE_SYS_SYSMACROS_H -DNO_CRYPTSETUP_PATH +CFLAGS=-O2 -g -Wall +LDLIBS=-lcryptsetup -ldevmapper +TESTS=$(wildcard *-test *-test2) api-test api-test-2 + +differ: differ.o + $(CC) -o $@ $^ + +api-test: api-test.o test_utils.o + $(CC) -o $@ $^ $(LDLIBS) + +api-test-2: api-test-2.o test_utils.o + $(CC) -o $@ $^ $(LDLIBS) + +tests: differ $(TESTS) + @for test in $(sort $(TESTS)); do \ + echo [$$test]; \ + ./$$test; \ + [ $$? -ne 77 -a $$? -ne 0 ] && exit 1; \ + true; \ + done; + +clean: + rm -f *.o differ api-test api-test-2 + +.PHONY: clean |