]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - lib/libarchive/test/Makefile
MFS r286082:
[FreeBSD/releng/10.2.git] / lib / libarchive / test / Makefile
1 # $FreeBSD$
2
3 LIBARCHIVEDIR=  ${.CURDIR}/../../../contrib/libarchive
4
5 MAN=
6
7 PROG=libarchive_test
8 INTERNALPROG=yes  # Don't install this; it's just for testing
9 DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
10 LDADD= -L ${.OBJDIR}/.. -larchive
11 LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
12 CFLAGS+= -g
13 CFLAGS+= -I${.CURDIR}/.. -I${.OBJDIR}
14 CFLAGS+= -I${LIBARCHIVEDIR}/libarchive -I${LIBARCHIVEDIR}/test_utils
15 CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
16
17 # Uncomment to link against dmalloc
18 #LDADD+= -L/usr/local/lib -ldmalloc
19 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
20
21 .PATH:  ${LIBARCHIVEDIR}/libarchive/test
22 TESTS= \
23         test_acl_freebsd_nfs4.c                 \
24         test_acl_freebsd_posix1e.c              \
25         test_acl_nfs4.c                         \
26         test_acl_pax.c                          \
27         test_acl_posix1e.c                      \
28         test_archive_api_feature.c              \
29         test_archive_clear_error.c              \
30         test_archive_cmdline.c                  \
31         test_archive_crypto.c                   \
32         test_archive_getdate.c                  \
33         test_archive_match_time.c               \
34         test_archive_match_owner.c              \
35         test_archive_match_path.c               \
36         test_archive_pathmatch.c                \
37         test_archive_read_close_twice.c         \
38         test_archive_read_close_twice_open_fd.c \
39         test_archive_read_close_twice_open_filename.c   \
40         test_archive_read_multiple_data_objects.c       \
41         test_archive_read_next_header_empty.c   \
42         test_archive_read_next_header_raw.c     \
43         test_archive_read_open2.c               \
44         test_archive_read_set_filter_option.c   \
45         test_archive_read_set_format_option.c   \
46         test_archive_read_set_option.c          \
47         test_archive_read_set_options.c         \
48         test_archive_read_support.c             \
49         test_archive_set_error.c                \
50         test_archive_string.c                   \
51         test_archive_string_conversion.c        \
52         test_archive_write_add_filter_by_name.c \
53         test_archive_write_set_filter_option.c  \
54         test_archive_write_set_format_by_name.c \
55         test_archive_write_set_format_option.c  \
56         test_archive_write_set_option.c         \
57         test_archive_write_set_options.c        \
58         test_bad_fd.c                           \
59         test_compat_bzip2.c                     \
60         test_compat_cpio.c                      \
61         test_compat_gtar.c                      \
62         test_compat_gzip.c                      \
63         test_compat_lzip.c                      \
64         test_compat_lzma.c                      \
65         test_compat_lzop.c                      \
66         test_compat_mac.c                       \
67         test_compat_pax_libarchive_2x.c         \
68         test_compat_solaris_tar_acl.c           \
69         test_compat_solaris_pax_sparse.c        \
70         test_compat_tar_hardlink.c              \
71         test_compat_uudecode.c                  \
72         test_compat_xz.c                        \
73         test_compat_zip.c                       \
74         test_empty_write.c                      \
75         test_entry.c                            \
76         test_entry_strmode.c                    \
77         test_extattr_freebsd.c                  \
78         test_filter_count.c                     \
79         test_fuzz.c                             \
80         test_gnutar_filename_encoding.c         \
81         test_link_resolver.c                    \
82         test_open_fd.c                          \
83         test_open_failure.c                     \
84         test_open_file.c                        \
85         test_open_filename.c                    \
86         test_pax_filename_encoding.c            \
87         test_read_data_large.c                  \
88         test_read_disk.c                        \
89         test_read_disk_directory_traversals.c   \
90         test_read_disk_entry_from_file.c        \
91         test_read_extract.c                     \
92         test_read_file_nonexistent.c            \
93         test_read_filter_grzip.c                \
94         test_read_filter_lrzip.c                \
95         test_read_filter_lzop.c                 \
96         test_read_filter_lzop_multiple_parts.c  \
97         test_read_filter_program.c              \
98         test_read_filter_program_signature.c    \
99         test_read_filter_uudecode.c             \
100         test_read_format_7zip.c                 \
101         test_read_format_ar.c                   \
102         test_read_format_cab.c                  \
103         test_read_format_cab_filename.c         \
104         test_read_format_cpio_afio.c            \
105         test_read_format_cpio_bin.c             \
106         test_read_format_cpio_bin_Z.c           \
107         test_read_format_cpio_bin_be.c          \
108         test_read_format_cpio_bin_bz2.c         \
109         test_read_format_cpio_bin_gz.c          \
110         test_read_format_cpio_bin_lzip.c        \
111         test_read_format_cpio_bin_lzma.c        \
112         test_read_format_cpio_bin_xz.c          \
113         test_read_format_cpio_filename.c        \
114         test_read_format_cpio_odc.c             \
115         test_read_format_cpio_svr4_gzip.c       \
116         test_read_format_cpio_svr4c_Z.c         \
117         test_read_format_cpio_svr4_bzip2_rpm.c  \
118         test_read_format_cpio_svr4_gzip_rpm.c   \
119         test_read_format_empty.c                \
120         test_read_format_gtar_filename.c        \
121         test_read_format_gtar_gz.c              \
122         test_read_format_gtar_lzma.c            \
123         test_read_format_gtar_sparse.c          \
124         test_read_format_gtar_sparse_skip_entry.c \
125         test_read_format_iso_Z.c                \
126         test_read_format_iso_multi_extent.c     \
127         test_read_format_iso_xorriso.c          \
128         test_read_format_isorr_rr_moved.c       \
129         test_read_format_isojoliet_bz2.c        \
130         test_read_format_isojoliet_long.c       \
131         test_read_format_isojoliet_rr.c         \
132         test_read_format_isojoliet_versioned.c  \
133         test_read_format_isorr_bz2.c            \
134         test_read_format_isorr_ce.c             \
135         test_read_format_isorr_new_bz2.c        \
136         test_read_format_isozisofs_bz2.c        \
137         test_read_format_lha.c                  \
138         test_read_format_lha_filename.c         \
139         test_read_format_mtree.c                \
140         test_read_format_pax_bz2.c              \
141         test_read_format_rar.c                  \
142         test_read_format_raw.c                  \
143         test_read_format_tar.c                  \
144         test_read_format_tar_empty_filename.c   \
145         test_read_format_tar_filename.c         \
146         test_read_format_tbz.c                  \
147         test_read_format_tgz.c                  \
148         test_read_format_tlz.c                  \
149         test_read_format_txz.c                  \
150         test_read_format_tz.c                   \
151         test_read_format_ustar_filename.c       \
152         test_read_format_xar.c                  \
153         test_read_format_zip.c                  \
154         test_read_format_zip_comment_stored.c   \
155         test_read_format_zip_filename.c         \
156         test_read_format_zip_mac_metadata.c     \
157         test_read_format_zip_sfx.c              \
158         test_read_large.c                       \
159         test_read_pax_truncated.c               \
160         test_read_position.c                    \
161         test_read_set_format.c                  \
162         test_read_truncated.c                   \
163         test_read_truncated_filter.c            \
164         test_sparse_basic.c                     \
165         test_tar_filenames.c                    \
166         test_tar_large.c                        \
167         test_ustar_filenames.c                  \
168         test_ustar_filename_encoding.c          \
169         test_write_disk.c                       \
170         test_write_disk_appledouble.c           \
171         test_write_disk_failures.c              \
172         test_write_disk_hardlink.c              \
173         test_write_disk_hfs_compression.c       \
174         test_write_disk_lookup.c                \
175         test_write_disk_mac_metadata.c          \
176         test_write_disk_no_hfs_compression.c    \
177         test_write_disk_perms.c                 \
178         test_write_disk_secure.c                \
179         test_write_disk_sparse.c                \
180         test_write_disk_symlink.c               \
181         test_write_disk_times.c                 \
182         test_write_filter_b64encode.c           \
183         test_write_filter_bzip2.c               \
184         test_write_filter_compress.c            \
185         test_write_filter_gzip.c                \
186         test_write_filter_gzip_timestamp.c      \
187         test_write_filter_lrzip.c               \
188         test_write_filter_lzip.c                \
189         test_write_filter_lzma.c                \
190         test_write_filter_lzop.c                \
191         test_write_filter_program.c             \
192         test_write_filter_uuencode.c            \
193         test_write_filter_xz.c                  \
194         test_write_format_7zip.c                \
195         test_write_format_7zip_empty.c          \
196         test_write_format_7zip_large.c          \
197         test_write_format_ar.c                  \
198         test_write_format_cpio.c                \
199         test_write_format_cpio_empty.c          \
200         test_write_format_cpio_newc.c           \
201         test_write_format_cpio_odc.c            \
202         test_write_format_gnutar.c              \
203         test_write_format_iso9660.c             \
204         test_write_format_iso9660_boot.c        \
205         test_write_format_iso9660_empty.c       \
206         test_write_format_iso9660_filename.c    \
207         test_write_format_iso9660_zisofs.c      \
208         test_write_format_mtree.c               \
209         test_write_format_mtree_absolute_path.c \
210         test_write_format_mtree_classic.c       \
211         test_write_format_mtree_classic_indent.c        \
212         test_write_format_mtree_fflags.c        \
213         test_write_format_mtree_no_separator.c  \
214         test_write_format_mtree_quoted_filename.c       \
215         test_write_format_pax.c                 \
216         test_write_format_shar_empty.c          \
217         test_write_format_tar.c                 \
218         test_write_format_tar_empty.c           \
219         test_write_format_tar_sparse.c          \
220         test_write_format_tar_ustar.c           \
221         test_write_format_tar_v7tar.c           \
222         test_write_format_xar.c                 \
223         test_write_format_xar_empty.c           \
224         test_write_format_zip.c                 \
225         test_write_format_zip_empty.c           \
226         test_write_format_zip_no_compression.c  \
227         test_write_zip_set_compression_store.c  \
228         test_write_open_memory.c                \
229         test_zip_filename_encoding.c
230
231 # Build the test program.
232 SRCS= \
233         ${TESTS}                                \
234         list.h                                  \
235         main.c                                  \
236         read_open_memory.c
237
238 .PATH:  ${LIBARCHIVEDIR}/test_utils
239 SRCS+=  test_utils.c
240
241 # Build libarchive_test and run it.
242 check test: libarchive_test
243         ./libarchive_test -r ${LIBARCHIVEDIR}/libarchive/test
244
245 # list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines
246 list.h: ${TESTS} Makefile
247         (cd ${LIBARCHIVEDIR}/libarchive/test; cat test_*.c) | \
248         grep DEFINE_TEST > ${.OBJDIR}/list.h
249
250 CLEANFILES += *.out *.o *.core *~ list.h .dirstamp .depend
251 CLEANDIRS += .deps .libs
252
253 cleantest:
254         -chmod -R +w /tmp/libarchive_test.*
255         rm -rf /tmp/libarchive_test.*
256
257 .include <bsd.prog.mk>