1 2PACKAGE= tests 3 4_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive 5 6ATF_TESTS_SH+= functional_test 7 8BINDIR= ${TESTSDIR} 9 10PROGS+= bsdcat_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}/cat -I${_LIBARCHIVEDIR}/cat/test 17CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive 18CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive_fe -I${_LIBARCHIVEDIR}/test_utils 19 20CFLAGS.test_utils.c+= -Wno-cast-align 21 22# Uncomment to link against dmalloc 23#LDADD+= -L/usr/local/lib -ldmalloc 24#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC 25 26.PATH: ${_LIBARCHIVEDIR}/cat/test 27TESTS_SRCS= \ 28 test_0.c \ 29 test_empty_gz.c \ 30 test_empty_lz4.c \ 31 test_empty_xz.c \ 32 test_empty_zstd.c \ 33 test_error.c \ 34 test_error_mixed.c \ 35 test_expand_Z.c \ 36 test_expand_bz2.c \ 37 test_expand_gz.c \ 38 test_expand_lz4.c \ 39 test_expand_mixed.c \ 40 test_expand_plain.c \ 41 test_expand_xz.c \ 42 test_expand_zstd.c \ 43 test_help.c \ 44 test_stdin.c \ 45 test_version.c 46 47SRCS.bsdcat_test= list.h \ 48 ${TESTS_SRCS} 49 50.PATH: ${_LIBARCHIVEDIR}/test_utils 51SRCS.bsdcat_test+= test_main.c \ 52 test_utils.c 53 54LIBADD.bsdcat_test= archive 55 56list.h: ${TESTS_SRCS} Makefile 57 @(cd ${_LIBARCHIVEDIR}/tar/test && \ 58 grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp 59 @mv ${.TARGET}.tmp ${.TARGET} 60 61CLEANFILES+= list.h list.h.tmp 62 63${PACKAGE}FILES+= test_empty.gz.uu 64${PACKAGE}FILES+= test_empty.lz4.uu 65${PACKAGE}FILES+= test_empty.xz.uu 66${PACKAGE}FILES+= test_empty.zst.uu 67${PACKAGE}FILES+= test_expand.Z.uu 68${PACKAGE}FILES+= test_expand.bz2.uu 69${PACKAGE}FILES+= test_expand.gz.uu 70${PACKAGE}FILES+= test_expand.lz4.uu 71${PACKAGE}FILES+= test_expand.plain.uu 72${PACKAGE}FILES+= test_expand.xz.uu 73${PACKAGE}FILES+= test_expand.zst.uu 74 75.include <bsd.test.mk> 76