xref: /freebsd/usr.bin/cpio/tests/Makefile (revision 49b49cda41feabe3439f7318e8bf40e3896c7bf4)
1# $FreeBSD$
2
3_LIBARCHIVEDIR=	${SRCTOP}/contrib/libarchive
4
5ATF_TESTS_SH+=	functional_test
6
7BINDIR=		${TESTSDIR}
8
9PROGS+=		bsdcpio_test
10
11CFLAGS+=	-DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\"
12CFLAGS+=	-I${SRCTOP}/lib/libarchive -I${.OBJDIR}
13
14CFLAGS+=	-I${.OBJDIR}
15CFLAGS+=	-I${_LIBARCHIVEDIR}/cpio -I${_LIBARCHIVEDIR}/libarchive_fe
16CFLAGS+=	-I${_LIBARCHIVEDIR}/test_utils
17
18# Uncomment to link against dmalloc
19#LDADD+= -L/usr/local/lib -ldmalloc
20#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
21
22.PATH:	${_LIBARCHIVEDIR}/cpio
23CPIO_SRCS= cmdline.c
24
25.PATH:	${_LIBARCHIVEDIR}/libarchive_fe
26CPIO_SRCS+= err.c
27
28.PATH:	${_LIBARCHIVEDIR}/cpio/test
29TESTS_SRCS=	\
30	test_0.c				\
31	test_basic.c				\
32	test_cmdline.c				\
33	test_extract_cpio_Z.c			\
34	test_extract_cpio_bz2.c			\
35	test_extract_cpio_grz.c			\
36	test_extract_cpio_gz.c			\
37	test_extract_cpio_lrz.c			\
38	test_extract_cpio_lz.c			\
39	test_extract_cpio_lzma.c		\
40	test_extract_cpio_lzo.c			\
41	test_extract_cpio_xz.c			\
42	test_format_newc.c			\
43	test_gcpio_compat.c			\
44	test_option_0.c				\
45	test_option_B_upper.c			\
46	test_option_C_upper.c			\
47	test_option_J_upper.c			\
48	test_option_L_upper.c			\
49	test_option_Z_upper.c			\
50	test_option_a.c				\
51	test_option_b64encode.c			\
52	test_option_c.c				\
53	test_option_d.c				\
54	test_option_f.c				\
55	test_option_grzip.c			\
56	test_option_help.c			\
57	test_option_l.c				\
58	test_option_lrzip.c			\
59	test_option_lzma.c			\
60	test_option_lzop.c			\
61	test_option_m.c				\
62	test_option_t.c				\
63	test_option_u.c				\
64	test_option_uuencode.c			\
65	test_option_version.c			\
66	test_option_xz.c			\
67	test_option_y.c				\
68	test_option_z.c				\
69	test_owner_parse.c			\
70	test_passthrough_dotdot.c		\
71	test_passthrough_reverse.c
72
73SRCS.bsdcpio_test= list.h			\
74	${CPIO_SRCS}				\
75	${TESTS_SRCS}				\
76	main.c
77
78.PATH:	${_LIBARCHIVEDIR}/test_utils
79SRCS.bsdcpio_test+=	test_utils.c
80
81LIBADD.bsdcpio_test=	archive
82
83list.h: ${TESTS_SRCS} Makefile
84	@(cd ${_LIBARCHIVEDIR}/tar/test && \
85	grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp
86	@mv ${.TARGET}.tmp ${.TARGET}
87
88CLEANFILES+=	list.h list.h.tmp
89
90FILES+= test_extract.cpio.Z.uu
91FILES+= test_extract.cpio.bz2.uu
92FILES+= test_extract.cpio.grz.uu
93FILES+= test_extract.cpio.gz.uu
94FILES+= test_extract.cpio.lrz.uu
95FILES+= test_extract.cpio.lz.uu
96FILES+= test_extract.cpio.lzma.uu
97FILES+= test_extract.cpio.lzo.uu
98FILES+= test_extract.cpio.xz.uu
99FILES+= test_gcpio_compat_ref.bin.uu
100FILES+= test_gcpio_compat_ref.crc.uu
101FILES+= test_gcpio_compat_ref.newc.uu
102FILES+= test_gcpio_compat_ref.ustar.uu
103FILES+= test_gcpio_compat_ref_nosym.bin.uu
104FILES+= test_gcpio_compat_ref_nosym.crc.uu
105FILES+= test_gcpio_compat_ref_nosym.newc.uu
106FILES+= test_gcpio_compat_ref_nosym.ustar.uu
107FILES+= test_option_f.cpio.uu
108FILES+= test_option_m.cpio.uu
109FILES+= test_option_t.cpio.uu
110FILES+= test_option_t.stdout.uu
111FILES+= test_option_tv.stdout.uu
112
113.include <bsd.test.mk>
114