1# $FreeBSD$ 2 3PACKAGE= tests 4 5_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive 6 7ATF_TESTS_SH+= functional_test 8 9BINDIR= ${TESTSDIR} 10 11PROGS+= bsdcat_test 12 13CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" 14CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} 15 16CFLAGS+= -I${.OBJDIR} 17CFLAGS+= -I${_LIBARCHIVEDIR}/cat -I${_LIBARCHIVEDIR}/libarchive_fe 18CFLAGS+= -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 24.PATH: ${_LIBARCHIVEDIR}/cat/test 25TESTS_SRCS= \ 26 test_0.c \ 27 test_empty_gz.c \ 28 test_empty_lz4.c \ 29 test_empty_xz.c \ 30 test_error.c \ 31 test_error_mixed.c \ 32 test_expand_Z.c \ 33 test_expand_bz2.c \ 34 test_expand_gz.c \ 35 test_expand_lz4.c \ 36 test_expand_mixed.c \ 37 test_expand_plain.c \ 38 test_expand_xz.c \ 39 test_help.c \ 40 test_version.c 41 42SRCS.bsdcat_test= list.h \ 43 ${TESTS_SRCS} \ 44 main.c 45 46.PATH: ${_LIBARCHIVEDIR}/test_utils 47SRCS.bsdcat_test+= test_utils.c 48 49LIBADD.bsdcat_test= archive 50 51list.h: ${TESTS_SRCS} Makefile 52 @(cd ${_LIBARCHIVEDIR}/tar/test && \ 53 grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp 54 @mv ${.TARGET}.tmp ${.TARGET} 55 56CLEANFILES+= list.h list.h.tmp 57 58${PACKAGE}FILES+= test_empty.gz.uu 59${PACKAGE}FILES+= test_empty.lz4.uu 60${PACKAGE}FILES+= test_empty.xz.uu 61${PACKAGE}FILES+= test_expand.Z.uu 62${PACKAGE}FILES+= test_expand.bz2.uu 63${PACKAGE}FILES+= test_expand.gz.uu 64${PACKAGE}FILES+= test_expand.lz4.uu 65${PACKAGE}FILES+= test_expand.plain.uu 66${PACKAGE}FILES+= test_expand.xz.uu 67 68.include <bsd.test.mk> 69