Makefile revision 324417
1# $FreeBSD: stable/11/usr.bin/tar/tests/Makefile 324417 2017-10-08 20:54:53Z mm $
2
3PACKAGE=	tests
4
5_LIBARCHIVEDIR=	${SRCTOP}/contrib/libarchive
6
7ATF_TESTS_SH+=	functional_test
8
9BINDIR=		${TESTSDIR}
10
11CFLAGS+=	-DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\"
12CFLAGS+=	-I${SRCTOP}/lib/libarchive -I${.OBJDIR}
13CFLAGS+=	-I${_LIBARCHIVEDIR}/libarchive
14CFLAGS+=	-I${_LIBARCHIVEDIR}/tar -I${_LIBARCHIVEDIR}/tar/test
15CFLAGS+=	-I${_LIBARCHIVEDIR}/test_utils
16
17# Uncomment to link against dmalloc
18#LDADD+= -L/usr/local/lib -ldmalloc
19#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
20
21PROGS+=		bsdtar_test
22
23.PATH: ${_LIBARCHIVEDIR}/tar/test
24TESTS_SRCS=	\
25	test_0.c				\
26	test_basic.c				\
27	test_copy.c				\
28	test_empty_mtree.c			\
29	test_extract_tar_bz2.c			\
30	test_extract_tar_grz.c			\
31	test_extract_tar_gz.c			\
32	test_extract_tar_lrz.c			\
33	test_extract_tar_lz.c			\
34	test_extract_tar_lz4.c			\
35	test_extract_tar_lzma.c			\
36	test_extract_tar_lzo.c			\
37	test_extract_tar_xz.c			\
38	test_extract_tar_zstd.c			\
39	test_format_newc.c			\
40	test_help.c				\
41	test_leading_slash.c			\
42	test_missing_file.c			\
43	test_option_C_upper.c			\
44	test_option_H_upper.c			\
45	test_option_L_upper.c			\
46	test_option_O_upper.c			\
47	test_option_T_upper.c			\
48	test_option_U_upper.c			\
49	test_option_X_upper.c			\
50	test_option_a.c				\
51	test_option_acls.c			\
52	test_option_b.c				\
53	test_option_b64encode.c			\
54	test_option_exclude.c			\
55	test_option_fflags.c			\
56	test_option_gid_gname.c			\
57	test_option_grzip.c			\
58	test_option_j.c				\
59	test_option_k.c				\
60	test_option_keep_newer_files.c		\
61	test_option_lrzip.c			\
62	test_option_lz4.c			\
63	test_option_lzma.c			\
64	test_option_lzop.c			\
65	test_option_n.c				\
66	test_option_newer_than.c		\
67	test_option_nodump.c			\
68	test_option_older_than.c		\
69	test_option_passphrase.c		\
70	test_option_q.c				\
71	test_option_r.c				\
72	test_option_s.c				\
73	test_option_uid_uname.c			\
74	test_option_uuencode.c			\
75	test_option_xattrs.c			\
76	test_option_xz.c			\
77	test_option_z.c				\
78	test_option_zstd.c			\
79	test_patterns.c				\
80	test_print_longpath.c			\
81	test_stdio.c				\
82	test_strip_components.c			\
83	test_symlink_dir.c			\
84	test_version.c
85
86SRCS.bsdtar_test=	\
87	${TESTS_SRCS}	\
88	list.h
89
90.PATH: ${_LIBARCHIVEDIR}/test_utils
91SRCS.bsdtar_test+=	test_main.c		\
92			test_utils.c
93
94LIBADD.bsdtar_test=	archive
95
96list.h: ${TESTS_SRCS} Makefile
97	@(cd ${_LIBARCHIVEDIR}/tar/test && \
98	grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp
99	@mv ${.TARGET}.tmp ${.TARGET}
100
101CLEANFILES+=	list.h list.h.tmp
102
103${PACKAGE}FILES+=	test_extract.tar.Z.uu
104${PACKAGE}FILES+=	test_extract.tar.bz2.uu
105${PACKAGE}FILES+=	test_extract.tar.grz.uu
106${PACKAGE}FILES+=	test_extract.tar.gz.uu
107${PACKAGE}FILES+=	test_extract.tar.lrz.uu
108${PACKAGE}FILES+=	test_extract.tar.lz.uu
109${PACKAGE}FILES+=	test_extract.tar.lz4.uu
110${PACKAGE}FILES+=	test_extract.tar.lzma.uu
111${PACKAGE}FILES+=	test_extract.tar.lzo.uu
112${PACKAGE}FILES+=	test_extract.tar.xz.uu
113${PACKAGE}FILES+=	test_extract.tar.zst.uu
114${PACKAGE}FILES+=	test_leading_slash.tar.uu
115${PACKAGE}FILES+=	test_option_keep_newer_files.tar.Z.uu
116${PACKAGE}FILES+=	test_option_passphrase.zip.uu
117${PACKAGE}FILES+=	test_option_s.tar.Z.uu
118${PACKAGE}FILES+=	test_patterns_2.tar.uu
119${PACKAGE}FILES+=	test_patterns_3.tar.uu
120${PACKAGE}FILES+=	test_patterns_4.tar.uu
121${PACKAGE}FILES+=	test_print_longpath.tar.Z.uu
122
123.include <bsd.test.mk>
124