"Fossies" - the Fresh Open Source Software Archive

Member "libzip-1.5.2/regress/CMakeLists.txt" (12 Mar 2019, 5585 Bytes) of package /linux/misc/libzip-1.5.2.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "CMakeLists.txt": 1.5.0_vs_1.5.1.

    1 CHECK_FUNCTION_EXISTS(getopt HAVE_GETOPT)
    2 IF(NOT HAVE_GETOPT)
    3   SET(SRC_EXTRA_FILES ../src/getopt.c)
    4 ENDIF()
    5 
    6 SET(TEST_PROGRAMS
    7   add_from_filep
    8   fopen_unchanged
    9   fseek
   10   nonrandomopentest
   11 )
   12 
   13 SET(GETOPT_USERS
   14   fread
   15   tryopen
   16 )
   17 
   18 ADD_EXECUTABLE(can_clone_file can_clone_file.c)
   19 
   20 SET(ENV{srcdir} ${CMAKE_CURRENT_SOURCE_DIR})
   21 FOREACH(PROGRAM ${TEST_PROGRAMS})
   22   ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.c)
   23   TARGET_LINK_LIBRARIES(${PROGRAM} zip)
   24 ENDFOREACH()
   25 
   26 ADD_EXECUTABLE(hole hole.c ${SRC_EXTRA_FILES} source_hole.c)
   27 TARGET_LINK_LIBRARIES(hole zip)
   28 
   29 ADD_EXECUTABLE(ziptool_regress ziptool_regress.c ${SRC_EXTRA_FILES} source_hole.c)
   30 TARGET_LINK_LIBRARIES(ziptool_regress zip)
   31 
   32 #ADD_LIBRARY(malloc MODULE malloc.c)
   33 #TARGET_LINK_LIBRARIES(malloc ${CMAKE_DL_LIBS})
   34 ADD_LIBRARY(nonrandomopen MODULE nonrandomopen.c)
   35 TARGET_LINK_LIBRARIES(nonrandomopen ${CMAKE_DL_LIBS})
   36 
   37 FOREACH(PROGRAM ${GETOPT_USERS})
   38   ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.c ${SRC_EXTRA_FILES})
   39   TARGET_LINK_LIBRARIES(${PROGRAM} zip)
   40 ENDFOREACH()
   41 
   42 # for appveyor builds
   43 #SET(CMAKE_MSVCIDE_RUN_PATH C:/projects/libzip/vstudio/zlib/installed/bin;C:/projects/libzip/vstudio/zlib/installed/lib;C:/projects/libzip/build/lib/Release)
   44 
   45 ADD_CUSTOM_TARGET(cleanup
   46     COMMAND ${CMAKE_COMMAND} -DDIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/cleanup.cmake
   47     )
   48 
   49 ADD_CUSTOM_TARGET(testinput
   50   ALL
   51   VERBATIM
   52   COMMAND cmake -E tar x ${CMAKE_CURRENT_SOURCE_DIR}/manyfiles-zip.zip
   53   COMMAND cmake -E tar x ${CMAKE_CURRENT_SOURCE_DIR}/bigzero-zip.zip
   54   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/manyfiles-zip.zip ${CMAKE_CURRENT_SOURCE_DIR}/bigzero-zip.zip
   55 )
   56 
   57 SET_PROPERTY(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
   58   bigzero.zip
   59   manyfiles-133000.zip
   60   manyfiles-65536.zip
   61   manyfiles-fewer.zip
   62   manyfiles-more.zip
   63   manyfiles-zip64-modulo.zip
   64   manyfiles-zip64.zip
   65   manyfiles.zip
   66 )
   67 
   68 SET(EXTRA_TESTS
   69 	add_dir.test
   70 	add_from_buffer.test
   71 	add_from_file.test
   72 	add_from_file_duplicate.test
   73 	add_from_file_twice_duplicate.test
   74 	add_from_filep.test
   75 	add_from_stdin.test
   76 	add_from_zip_closed.test
   77 	add_from_zip_deflated.test
   78 	add_from_zip_deflated2.test
   79 	add_from_zip_partial_deflated.test
   80 	add_from_zip_partial_stored.test
   81 	add_from_zip_stored.test
   82 	add_stored.test
   83 	add_stored_in_memory.test
   84 	buffer-fragment-read.test
   85 	buffer-fragment-write.test
   86         clone-buffer-add.test
   87         clone-buffer-delete.test
   88         clone-buffer-replace.test
   89         clone-fs-add.test
   90         clone-fs-delete.test
   91         clone-fs-replace.test
   92 	cm-default.test
   93 	count_entries.test
   94 	decrypt-correct-password-aes128.test
   95 	decrypt-correct-password-aes192.test
   96 	decrypt-correct-password-aes256.test
   97 	decrypt-correct-password-pkware.test
   98 	decrypt-no-password-aes256.test
   99 	decrypt-wrong-password-aes128.test
  100 	decrypt-wrong-password-aes192.test
  101 	decrypt-wrong-password-aes256.test
  102 	decrypt-wrong-password-pkware.test
  103 	delete_add_same.test
  104 	delete_invalid.test
  105 	delete_last.test
  106 	delete_multiple_last.test
  107 	delete_multiple_partial.test
  108 	delete_renamed_rename.test
  109 	encrypt.test
  110 	encryption-nonrandom-aes128.test
  111 	encryption-nonrandom-aes192.test
  112 	encryption-nonrandom-aes256.test
  113 	encryption-remove.test
  114 	extra_add.test
  115 	extra_add_multiple.test
  116 	extra_count.test
  117 	extra_count_by_id.test
  118 	extra_count_ignore_zip64.test
  119 	extra_delete.test
  120 	extra_delete_by_id.test
  121 	extra_field_align.test
  122 	extra_get.test
  123 	extra_get_by_id.test
  124 	extra_set.test
  125 	extra_set_modify_c.test
  126 	extra_set_modify_l.test
  127 	fdopen_ok.test
  128 	file_comment_encmismatch.test
  129 	fopen_unchanged.test
  130 	fread.test
  131 	fseek_deflated.test
  132 	fseek_fail.test
  133 	fseek_ok.test
  134 	get_comment.test
  135 	junk_at_end.test
  136 	junk_at_start.test
  137 	name_locate.test
  138 	open_cons_extrabytes.test
  139 	open_empty.test
  140 	open_empty_2.test
  141 	open_extrabytes.test
  142 	open_file_count.test
  143 	open_filename_duplicate.test
  144 	open_filename_duplicate_consistency.test
  145 	open_filename_duplicate_empty.test
  146 	open_filename_duplicate_empty_consistency.test
  147 	open_filename_empty.test
  148 	open_incons.test
  149 	open_many_fail.test
  150 	open_many_ok.test
  151 	open_multidisk.test
  152 	open_new_but_exists.test
  153 	open_new_ok.test
  154 	open_nonarchive.test
  155 	open_nosuchfile.test
  156 	open_ok.test
  157 	open_too_short.test
  158 	open_truncate.test
  159 	open_zip64_3mf.test
  160 	open_zip64_ok.test
  161 	preload.test
  162 	progress.test
  163 	rename_ascii.test
  164 	rename_cp437.test
  165 	rename_deleted.test
  166 	rename_fail.test
  167 	rename_ok.test
  168 	rename_utf8.test
  169 	rename_utf8_encmismatch.test
  170 	set_comment_all.test
  171 	set_comment_localonly.test
  172 	set_comment_removeglobal.test
  173 	set_comment_revert.test
  174 	set_compression_bzip2_to_deflate.test
  175 	set_compression_deflate_to_bzip2.test
  176 	set_compression_deflate_to_deflate.test
  177 	set_compression_deflate_to_store.test
  178 	set_compression_store_to_bzip2.test
  179 	set_compression_store_to_deflate.test
  180 	set_compression_store_to_store.test
  181 	set_compression_unknown.test
  182 	stat_index_cp437_guess.test
  183 	stat_index_cp437_raw.test
  184 	stat_index_cp437_strict.test
  185 	stat_index_fileorder.test
  186 	stat_index_streamed.test
  187 	stat_index_streamed_zip64.test
  188 	stat_index_utf8_guess.test
  189 	stat_index_utf8_raw.test
  190 	stat_index_utf8_strict.test
  191 	stat_index_utf8_unmarked_strict.test
  192 	stat_index_zip64.test
  193 	utf-8-standardization.test
  194 	zip-in-archive-comment.test
  195 	zip64_creation.test
  196 	zip64_stored_creation.test
  197 )
  198 
  199 FOREACH(CASE ${EXTRA_TESTS})
  200   ADD_TEST(${CASE} perl ${CMAKE_BINARY_DIR}/regress/runtest ${CMAKE_CURRENT_SOURCE_DIR}/${CASE})
  201   SET_TESTS_PROPERTIES(${CASE} PROPERTIES SKIP_RETURN_CODE 77)
  202 ENDFOREACH()
  203 
  204 INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../lib ${CMAKE_CURRENT_SOURCE_DIR}/../src ${CMAKE_CURRENT_BINARY_DIR}/..)
  205 
  206 ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND})