xref: /freebsd/usr.bin/bsdcat/tests/Makefile (revision 5c831a5bd61576cacb48b39f8eeb47b92707a355)
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
21cdf63a70SMartin Matuska# Uncomment to link against dmalloc
22cdf63a70SMartin Matuska#LDADD+= -L/usr/local/lib -ldmalloc
23cdf63a70SMartin Matuska#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
24cdf63a70SMartin Matuska
25cdf63a70SMartin Matuska.PATH:	${_LIBARCHIVEDIR}/cat/test
26cdf63a70SMartin MatuskaTESTS_SRCS=	\
27cdf63a70SMartin Matuska	test_0.c				\
28cdf63a70SMartin Matuska	test_empty_gz.c				\
29cdf63a70SMartin Matuska	test_empty_lz4.c			\
30cdf63a70SMartin Matuska	test_empty_xz.c				\
31*5c831a5bSMartin Matuska	test_empty_zstd.c			\
32cdf63a70SMartin Matuska	test_error.c				\
33cdf63a70SMartin Matuska	test_error_mixed.c			\
34cdf63a70SMartin Matuska	test_expand_Z.c				\
35cdf63a70SMartin Matuska	test_expand_bz2.c			\
36cdf63a70SMartin Matuska	test_expand_gz.c			\
37cdf63a70SMartin Matuska	test_expand_lz4.c			\
38cdf63a70SMartin Matuska	test_expand_mixed.c			\
39cdf63a70SMartin Matuska	test_expand_plain.c			\
40cdf63a70SMartin Matuska	test_expand_xz.c			\
41*5c831a5bSMartin Matuska	test_expand_zstd.c			\
42cdf63a70SMartin Matuska	test_help.c				\
43cdf63a70SMartin Matuska	test_version.c
44cdf63a70SMartin Matuska
45cdf63a70SMartin MatuskaSRCS.bsdcat_test= list.h			\
4664287048SMartin Matuska	${TESTS_SRCS}
47cdf63a70SMartin Matuska
48cdf63a70SMartin Matuska.PATH:	${_LIBARCHIVEDIR}/test_utils
4964287048SMartin MatuskaSRCS.bsdcat_test+=	test_main.c		\
5064287048SMartin Matuska			test_utils.c
51cdf63a70SMartin Matuska
52cdf63a70SMartin MatuskaLIBADD.bsdcat_test=	archive
53cdf63a70SMartin Matuska
54cdf63a70SMartin Matuskalist.h: ${TESTS_SRCS} Makefile
55cdf63a70SMartin Matuska	@(cd ${_LIBARCHIVEDIR}/tar/test && \
56cdf63a70SMartin Matuska	grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp
57cdf63a70SMartin Matuska	@mv ${.TARGET}.tmp ${.TARGET}
58cdf63a70SMartin Matuska
59cdf63a70SMartin MatuskaCLEANFILES+=	list.h list.h.tmp
60cdf63a70SMartin Matuska
61cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_empty.gz.uu
62cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_empty.lz4.uu
63cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_empty.xz.uu
64*5c831a5bSMartin Matuska${PACKAGE}FILES+=	test_empty.zst.uu
65cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.Z.uu
66cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.bz2.uu
67cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.gz.uu
68cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.lz4.uu
69cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.plain.uu
70cdf63a70SMartin Matuska${PACKAGE}FILES+=	test_expand.xz.uu
71*5c831a5bSMartin Matuska${PACKAGE}FILES+=	test_expand.zst.uu
72cdf63a70SMartin Matuska
73cdf63a70SMartin Matuska.include <bsd.test.mk>
74