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