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