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