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