xref: /freebsd/usr.bin/bsdcat/tests/Makefile (revision 833a452e9f082a7982a31c21f0da437dbbe0a39d)
1cdf63a70SMartin Matuska# $FreeBSD$
2cdf63a70SMartin Matuska
3cdf63a70SMartin MatuskaPACKAGE=	tests
4cdf63a70SMartin Matuska
5cdf63a70SMartin Matuska_LIBARCHIVEDIR=	${SRCTOP}/contrib/libarchive
6cdf63a70SMartin Matuska
7cdf63a70SMartin MatuskaATF_TESTS_SH+=	functional_test
8cdf63a70SMartin Matuska
9cdf63a70SMartin MatuskaBINDIR=		${TESTSDIR}
10cdf63a70SMartin Matuska
11cdf63a70SMartin MatuskaPROGS+=		bsdcat_test
12cdf63a70SMartin Matuska
13cdf63a70SMartin MatuskaCFLAGS+=	-DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\"
14cdf63a70SMartin MatuskaCFLAGS+=	-I${SRCTOP}/lib/libarchive -I${.OBJDIR}
15cdf63a70SMartin Matuska
16cdf63a70SMartin MatuskaCFLAGS+=	-I${.OBJDIR}
1764287048SMartin MatuskaCFLAGS+=	-I${_LIBARCHIVEDIR}/cat -I${_LIBARCHIVEDIR}/cat/test
184657548dSMartin MatuskaCFLAGS+=	-I${_LIBARCHIVEDIR}/libarchive
1964287048SMartin MatuskaCFLAGS+=	-I${_LIBARCHIVEDIR}/libarchive_fe -I${_LIBARCHIVEDIR}/test_utils
20cdf63a70SMartin Matuska
21*833a452eSMartin MatuskaCFLAGS.test_utils.c+=	-Wno-cast-align
22*833a452eSMartin Matuska
23cdf63a70SMartin Matuska# Uncomment to link against dmalloc
24cdf63a70SMartin Matuska#LDADD+= -L/usr/local/lib -ldmalloc
25cdf63a70SMartin Matuska#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
26cdf63a70SMartin Matuska
27cdf63a70SMartin Matuska.PATH:	${_LIBARCHIVEDIR}/cat/test
28cdf63a70SMartin MatuskaTESTS_SRCS=	\
29cdf63a70SMartin Matuska	test_0.c				\
30cdf63a70SMartin Matuska	test_empty_gz.c				\
31cdf63a70SMartin Matuska	test_empty_lz4.c			\
32cdf63a70SMartin Matuska	test_empty_xz.c				\
335c831a5bSMartin Matuska	test_empty_zstd.c			\
34cdf63a70SMartin Matuska	test_error.c				\
35cdf63a70SMartin Matuska	test_error_mixed.c			\
36cdf63a70SMartin Matuska	test_expand_Z.c				\
37cdf63a70SMartin Matuska	test_expand_bz2.c			\
38cdf63a70SMartin Matuska	test_expand_gz.c			\
39cdf63a70SMartin Matuska	test_expand_lz4.c			\
40cdf63a70SMartin Matuska	test_expand_mixed.c			\
41cdf63a70SMartin Matuska	test_expand_plain.c			\
42cdf63a70SMartin Matuska	test_expand_xz.c			\
435c831a5bSMartin Matuska	test_expand_zstd.c			\
44cdf63a70SMartin Matuska	test_help.c				\
45a2a3407cSMartin Matuska	test_stdin.c				\
46cdf63a70SMartin Matuska	test_version.c
47cdf63a70SMartin Matuska
48cdf63a70SMartin MatuskaSRCS.bsdcat_test= list.h			\
4964287048SMartin Matuska	${TESTS_SRCS}
50cdf63a70SMartin Matuska
51cdf63a70SMartin Matuska.PATH:	${_LIBARCHIVEDIR}/test_utils
5264287048SMartin MatuskaSRCS.bsdcat_test+=	test_main.c		\
5364287048SMartin Matuska			test_utils.c
54cdf63a70SMartin Matuska
55cdf63a70SMartin MatuskaLIBADD.bsdcat_test=	archive
56cdf63a70SMartin Matuska
57cdf63a70SMartin Matuskalist.h: ${TESTS_SRCS} Makefile
58cdf63a70SMartin Matuska	@(cd ${_LIBARCHIVEDIR}/tar/test && \
59cdf63a70SMartin Matuska	grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp
60cdf63a70SMartin Matuska	@mv ${.TARGET}.tmp ${.TARGET}
61cdf63a70SMartin Matuska
62cdf63a70SMartin MatuskaCLEANFILES+=	list.h list.h.tmp
63cdf63a70SMartin Matuska
64cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_empty.gz.uu
65cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_empty.lz4.uu
66cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_empty.xz.uu
675c831a5bSMartin Matuska${PACKAGE}FILES+=	test_empty.zst.uu
68cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.Z.uu
69cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.bz2.uu
70cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.gz.uu
71cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.lz4.uu
72cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.plain.uu
73cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.xz.uu
745c831a5bSMartin Matuska${PACKAGE}FILES+=	test_expand.zst.uu
75cdf63a70SMartin Matuska
76cdf63a70SMartin Matuska.include <bsd.test.mk>
77