19babed1c573558ba4d00c405d4bb30970c93c84
[platform/upstream/libzip.git] / regress / Makefile.am
1 AUTOMAKE_OPTIONS=       parallel-tests
2
3 noinst_SCRIPTS=         runtest
4
5 noinst_PROGRAMS= \
6         add_from_filep \
7         fopen_unchanged \
8         fread \
9         fseek \
10         tryopen
11
12 if !WIN32_HOST
13 pkglib_LTLIBRARIES=     malloc.la nonrandomopen.la
14
15 malloc_la_SOURCES=      malloc.c
16 malloc_la_LDFLAGS=      -module -avoid-version
17 malloc_la_LIBADD=       ${DLSYM_LIB}
18
19 nonrandomopen_la_SOURCES=       nonrandomopen.c
20 nonrandomopen_la_LDFLAGS=       -module -avoid-version
21 nonrandomopen_la_LIBADD=        ${DLSYM_LIB}
22
23 # we have to do it this way, because if we choose noinst_LTLIBRARIES,
24 # only the .a files are built
25 install-pkglibLTLIBRARIES:
26         @echo not installing shared objects needed only for testing
27 endif
28
29 EXTRA_DIST= \
30         CMakeLists.txt \
31         NiHTest.pm \
32         runtest.in \
33         ${TESTS} \
34         bigstored.zh \
35         bigzero-zip.zip \
36         bogus.zip \
37         broken.zip \
38         cm-default.zip \
39         encrypt-aes128-noentropy.zip \
40         encrypt-aes192-noentropy.zip \
41         encrypt-aes256-noentropy.zip \
42         encrypt-aes128.zip \
43         encrypt-aes192.zip \
44         encrypt-aes256.zip \
45         encrypt-none.zip \
46         encrypt.zip \
47         encrypt_plus_extra.zip \
48         encrypt_plus_extra_modified_c.zip \
49         encrypt_plus_extra_modified_l.zip \
50         extra_field_align_1-0.zip \
51         extra_field_align_1-ff.zip \
52         extra_field_align_2-0.zip \
53         extra_field_align_2-ff.zip \
54         extra_field_align_3-0.zip \
55         extra_field_align_3-ff.zip \
56         extra_field_align_4-ff.zip \
57         extra_field_align_1-ef_00.zip \
58         extra_field_align_1-ef_ff.zip \
59         extra_field_align_2-ef_00.zip \
60         extra_field_align_2-ef_ff.zip \
61         extra_field_align_3-ef_00.zip \
62         extra_field_align_3-ef_ff.zip \
63         filename_duplicate.zip \
64         filename_duplicate_empty.zip \
65         filename_empty.zip \
66         fileorder.zip \
67         firstsecond.zip \
68         firstsecond-split-deflated.zip \
69         firstsecond-split-stored.zip \
70         foo-stored.zip \
71         incons-archive-comment-longer.zip \
72         incons-archive-comment-shorter.zip \
73         incons-cdoffset.zip \
74         incons-central-compression-method.zip \
75         incons-central-compsize-larger-toolarge.zip \
76         incons-central-compsize-larger.zip \
77         incons-central-compsize-smaller.zip \
78         incons-central-crc.zip \
79         incons-central-date.zip \
80         incons-central-file-comment-longer.zip \
81         incons-central-file-comment-shorter.zip \
82         incons-central-magic-bad.zip \
83         incons-central-magic-bad2.zip \
84         incons-central-size-larger.zip \
85         incons-data.zip \
86         incons-ef-central-size-wrong.zip \
87         incons-ef-local-id-size.zip \
88         incons-ef-local-id.zip \
89         incons-ef-local-size.zip \
90         incons-eocd-magic-bad.zip \
91         incons-file-count-high.zip \
92         incons-file-count-low.zip \
93         incons-file-count-overflow.zip \
94         incons-local-compression-method.zip \
95         incons-local-compsize-larger.zip \
96         incons-local-compsize-smaller.zip \
97         incons-local-crc.zip \
98         incons-local-filename-long.zip \
99         incons-local-filename-missing.zip \
100         incons-local-filename-short.zip \
101         incons-local-filename.zip \
102         incons-local-magic-bad.zip \
103         incons-local-size-larger.zip \
104         junk-at-end.zip \
105         junk-at-start.zip \
106         large-uncompressable \
107         manyfiles-zip.zip \
108         multidisk.zip \
109         rename_ok.zip \
110         streamed.zip \
111         streamed-zip64.zip \
112         test.zip \
113         test2.zip \
114         test-cp437.zip \
115         test-cp437-comment-utf-8.zip \
116         test-cp437-fc.zip \
117         test-cp437-fc-utf-8-filename.zip \
118         test-utf8.zip \
119         test-utf8-unmarked.zip \
120         testbuffer.zip \
121         testdir.zip \
122         testchanged.zip \
123         testchangedlocal.zip \
124         testcomment.zip \
125         testcomment13.zip \
126         testcommentremoved.zip \
127         testdeflated.zip \
128         testdeflated2.zip \
129         testempty.zip \
130         testextrabytes.zip \
131         testfile.txt \
132         testfile.zip \
133         testfile-cp437.zip \
134         testfile-plus-extra.zip \
135         testfile-UTF8.zip \
136         testfile2014.zip \
137         teststdin.zip \
138         teststored.zip \
139         utf-8-standardization-input.zip \
140         utf-8-standardization-output.zip \
141         zip-in-archive-comment.zip \
142         zip64.zip \
143         zip64-3mf.zip
144
145 TESTS_ENVIRONMENT=      ZIPCMP=${top_builddir}/src/zipcmp
146 # ${srcdir}/runtest
147 #LOG_COMPILER=  ${srcdir}/runtest
148 TEST_EXTENSIONS= .test
149 TEST_LOG_COMPILER= ${builddir}/runtest
150 #AM_TEST_LOG_FLAGS = -s
151
152 TESTS= \
153         add_dir.test \
154         add_from_buffer.test \
155         add_from_file.test \
156         add_from_file_duplicate.test \
157         add_from_file_twice_duplicate.test \
158         add_from_filep.test \
159         add_from_stdin.test \
160         add_from_zip_closed.test \
161         add_from_zip_deflated.test \
162         add_from_zip_deflated2.test \
163         add_from_zip_partial_deflated.test \
164         add_from_zip_partial_stored.test \
165         add_from_zip_stored.test \
166         add_stored.test \
167         add_stored_in_memory.test \
168         cm-default.test \
169         count_entries.test \
170         decrypt-correct-password-aes128.test \
171         decrypt-correct-password-aes192.test \
172         decrypt-correct-password-aes256.test \
173         decrypt-correct-password-pkware.test \
174         decrypt-no-password-aes256.test \
175         decrypt-wrong-password-aes128.test \
176         decrypt-wrong-password-aes192.test \
177         decrypt-wrong-password-aes256.test \
178         decrypt-wrong-password-pkware.test \
179         delete_add_same.test \
180         delete_invalid.test \
181         delete_last.test \
182         delete_multiple_last.test \
183         delete_multiple_partial.test \
184         delete_renamed_rename.test \
185         encrypt.test \
186         encryption-remove.test \
187         extra_add.test \
188         extra_add_multiple.test \
189         extra_count.test \
190         extra_count_by_id.test \
191         extra_count_ignore_zip64.test \
192         extra_delete.test \
193         extra_delete_by_id.test \
194         extra_field_align.test \
195         extra_get.test \
196         extra_get_by_id.test \
197         extra_set.test \
198         extra_set_modify_c.test \
199         extra_set_modify_l.test \
200         file_comment_encmismatch.test \
201         fopen_unchanged.test \
202         fread.test \
203         fseek_deflated.test \
204         fseek_fail.test \
205         fseek_ok.test \
206         get_comment.test \
207         junk_at_end.test \
208         junk_at_start.test \
209         name_locate.test \
210         open_cons_extrabytes.test \
211         open_empty.test \
212         open_empty_2.test \
213         open_extrabytes.test \
214         open_file_count.test \
215         open_filename_duplicate.test \
216         open_filename_duplicate_consistency.test \
217         open_filename_duplicate_empty.test \
218         open_filename_duplicate_empty_consistency.test \
219         open_filename_empty.test \
220         open_incons.test \
221         open_many_fail.test \
222         open_many_ok.test \
223         open_multidisk.test \
224         open_new_but_exists.test \
225         open_new_ok.test \
226         open_nonarchive.test \
227         open_nosuchfile.test \
228         open_ok.test \
229         open_too_short.test \
230         open_truncate.test \
231         open_zip64_3mf.test \
232         open_zip64_ok.test \
233         progress.test \
234         rename_ascii.test \
235         rename_cp437.test \
236         rename_deleted.test \
237         rename_fail.test \
238         rename_ok.test \
239         rename_utf8.test \
240         rename_utf8_encmismatch.test \
241         set_comment_all.test \
242         set_comment_localonly.test \
243         set_comment_removeglobal.test \
244         set_comment_revert.test \
245         set_compression_deflate_to_deflate.test \
246         set_compression_deflate_to_store.test \
247         set_compression_store_to_deflate.test \
248         set_compression_store_to_store.test \
249         set_compression_unknown.test \
250         stat_index_cp437_guess.test \
251         stat_index_cp437_raw.test \
252         stat_index_cp437_strict.test \
253         stat_index_fileorder.test \
254         stat_index_streamed.test \
255         stat_index_streamed_zip64.test \
256         stat_index_utf8_guess.test \
257         stat_index_utf8_raw.test \
258         stat_index_utf8_strict.test \
259         stat_index_utf8_unmarked_strict.test \
260         stat_index_zip64.test \
261         utf-8-standardization.test \
262         zip-in-archive-comment.test \
263         zip64_creation.test \
264         zip64_stored_creation.test
265
266 DISABLED_TESTS= \
267         encryption-nonrandom-aes128.test \
268         encryption-nonrandom-aes192.test \
269         encryption-nonrandom-aes256.test
270
271 #XFAIL_TESTS=
272
273
274 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib -I${top_srcdir}/src
275 LDADD=${top_builddir}/lib/libzip.la
276
277 CREATED_FILES= \
278         bigzero.zip \
279         manyfiles-133000.zip \
280         manyfiles-65536.zip \
281         manyfiles-fewer.zip \
282         manyfiles-more.zip \
283         manyfiles-zip64-modulo.zip \
284         manyfiles-zip64.zip \
285         manyfiles.zip \
286         runtest
287
288 check-am: ${CREATED_FILES}
289
290 bigzero.zip: bigzero-zip.zip
291         ${top_builddir}/src/ziptool ${srcdir}/bigzero-zip.zip cat 0 > ${builddir}/bigzero.zip
292
293 manyfiles.zip: manyfiles-zip.zip
294         ${top_builddir}/src/ziptool ${srcdir}/manyfiles-zip.zip cat 0 > ${builddir}/$@
295
296 manyfiles-133000.zip: manyfiles-zip.zip
297         ${top_builddir}/src/ziptool ${srcdir}/manyfiles-zip.zip cat 1 > ${builddir}/$@
298
299 manyfiles-65536.zip: manyfiles-zip.zip
300         ${top_builddir}/src/ziptool ${srcdir}/manyfiles-zip.zip cat 2 > ${builddir}/$@
301
302 manyfiles-fewer.zip: manyfiles-zip.zip
303         ${top_builddir}/src/ziptool ${srcdir}/manyfiles-zip.zip cat 5 > ${builddir}/$@
304
305 manyfiles-more.zip: manyfiles-zip.zip
306         ${top_builddir}/src/ziptool ${srcdir}/manyfiles-zip.zip cat 6 > ${builddir}/$@
307
308 manyfiles-zip64-modulo.zip: manyfiles-zip.zip
309         ${top_builddir}/src/ziptool ${srcdir}/manyfiles-zip.zip cat 3 > ${builddir}/$@
310
311 manyfiles-zip64.zip: manyfiles-zip.zip
312         ${top_builddir}/src/ziptool ${srcdir}/manyfiles-zip.zip cat 4 > ${builddir}/$@
313
314 runtest: runtest.in
315         sed -e 's!@[s]rcdir@!${srcdir}!g' -e 's!@[a]bs_srcdir@!${abs_srcdir}!g' ${srcdir}/runtest.in > runtest
316         chmod +x runtest
317
318 cleanup:
319         rm -rf ${builddir}/sandbox-*.d[0-9]*/
320
321 CLEANFILES=${CREATED_FILES}