1 2PACKAGE= tests 3 4_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive 5 6ATF_TESTS_SH+= functional_test 7 8BINDIR= ${TESTSDIR} 9 10PROGS+= bsdunzip_test 11 12CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" 13CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} 14 15CFLAGS+= -I${.OBJDIR} 16CFLAGS+= -I${_LIBARCHIVEDIR}/unzip -I${_LIBARCHIVEDIR}/unzip/test 17CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive 18CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive_fe -I${_LIBARCHIVEDIR}/test_utils 19 20# Uncomment to link against dmalloc 21#LDADD+= -L/usr/local/lib -ldmalloc 22#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC 23 24CFLAGS.test_utils.c+= -Wno-cast-align 25 26.PATH: ${_LIBARCHIVEDIR}/libarchive_fe 27UNZIP_SRCS+= err.c 28 29.PATH: ${_LIBARCHIVEDIR}/unzip/test 30TESTS_SRCS= \ 31 test_0.c \ 32 test_C.c \ 33 test_L.c \ 34 test_P_encryption.c \ 35 test_Z1.c \ 36 test_basic.c \ 37 test_d.c \ 38 test_glob.c \ 39 test_j.c \ 40 test_n.c \ 41 test_not_exist.c \ 42 test_o.c \ 43 test_p.c \ 44 test_q.c \ 45 test_singlefile.c \ 46 test_t.c \ 47 test_t_bad.c \ 48 test_version.c \ 49 test_x.c 50 51SRCS.bsdunzip_test= list.h \ 52 ${UNZIP_SRCS} \ 53 ${TESTS_SRCS} 54 55.PATH: ${_LIBARCHIVEDIR}/test_utils 56SRCS.bsdunzip_test+= test_main.c \ 57 test_utils.c 58 59LIBADD.bsdunzip_test= archive 60 61list.h: ${TESTS_SRCS} Makefile 62 @(cd ${_LIBARCHIVEDIR}/unzip/test && \ 63 grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp 64 @mv ${.TARGET}.tmp ${.TARGET} 65 66CLEANFILES+= list.h list.h.tmp 67 68${PACKAGE}FILES+= test_basic.zip.uu 69${PACKAGE}FILES+= test_encrypted.zip.uu 70${PACKAGE}FILES+= test_singlefile.zip.uu 71${PACKAGE}FILES+= test_t_bad.zip.uu 72 73.include <bsd.test.mk> 74