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