~sergei.glushchenko/percona-xtrabackup/xb-pprint

« back to all changes in this revision

Viewing changes to src/libarchive/libarchive/test/CMakeLists.txt

merge parallel compression branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
############################################
 
2
#
 
3
# How to build libarchive_test
 
4
#
 
5
############################################
 
6
IF(ENABLE_TEST)
 
7
  FOREACH (_src ${libarchive_SOURCES})
 
8
    LIST(APPEND parent_libarchive_SOURCES "../${_src}")
 
9
  ENDFOREACH(_src)
 
10
 
 
11
  SET(libarchive_test_SOURCES
 
12
    ${parent_libarchive_SOURCES}
 
13
    main.c
 
14
    read_open_memory.c
 
15
    test.h
 
16
    test_acl_basic.c
 
17
    test_acl_freebsd.c
 
18
    test_acl_pax.c
 
19
    test_archive_api_feature.c
 
20
    test_bad_fd.c
 
21
    test_compat_bzip2.c
 
22
    test_compat_cpio.c
 
23
    test_compat_gtar.c
 
24
    test_compat_gzip.c
 
25
    test_compat_lzma.c
 
26
    test_compat_solaris_tar_acl.c
 
27
    test_compat_tar_hardlink.c
 
28
    test_compat_xz.c
 
29
    test_compat_zip.c
 
30
    test_empty_write.c
 
31
    test_entry.c
 
32
    test_entry_strmode.c
 
33
    test_extattr_freebsd.c
 
34
    test_fuzz.c
 
35
    test_link_resolver.c
 
36
    test_open_fd.c
 
37
    test_open_file.c
 
38
    test_open_filename.c
 
39
    test_pax_filename_encoding.c
 
40
    test_read_compress_program.c
 
41
    test_read_data_large.c
 
42
    test_read_disk.c
 
43
    test_read_disk_entry_from_file.c
 
44
    test_read_extract.c
 
45
    test_read_file_nonexistent.c
 
46
    test_read_format_ar.c
 
47
    test_read_format_cpio_bin.c
 
48
    test_read_format_cpio_bin_Z.c
 
49
    test_read_format_cpio_bin_be.c
 
50
    test_read_format_cpio_bin_bz2.c
 
51
    test_read_format_cpio_bin_gz.c
 
52
    test_read_format_cpio_bin_lzma.c
 
53
    test_read_format_cpio_bin_xz.c
 
54
    test_read_format_cpio_odc.c
 
55
    test_read_format_cpio_svr4_bzip2_rpm.c
 
56
    test_read_format_cpio_svr4_gzip.c
 
57
    test_read_format_cpio_svr4_gzip_rpm.c
 
58
    test_read_format_cpio_svr4c_Z.c
 
59
    test_read_format_empty.c
 
60
    test_read_format_gtar_gz.c
 
61
    test_read_format_gtar_lzma.c
 
62
    test_read_format_gtar_sparse.c
 
63
    test_read_format_iso_gz.c
 
64
    test_read_format_iso_multi_extent.c
 
65
    test_read_format_isojoliet_bz2.c
 
66
    test_read_format_isojoliet_long.c
 
67
    test_read_format_isojoliet_rr.c
 
68
    test_read_format_isorr_bz2.c
 
69
    test_read_format_isorr_ce.c
 
70
    test_read_format_isorr_new_bz2.c
 
71
    test_read_format_isorr_rr_moved.c
 
72
    test_read_format_isozisofs_bz2.c
 
73
    test_read_format_mtree.c
 
74
    test_read_format_pax_bz2.c
 
75
    test_read_format_raw.c
 
76
    test_read_format_tar.c
 
77
    test_read_format_tar_empty_filename.c
 
78
    test_read_format_tbz.c
 
79
    test_read_format_tgz.c
 
80
    test_read_format_tlz.c
 
81
    test_read_format_txz.c
 
82
    test_read_format_tz.c
 
83
    test_read_format_xar.c
 
84
    test_read_format_zip.c
 
85
    test_read_large.c
 
86
    test_read_pax_truncated.c
 
87
    test_read_position.c
 
88
    test_read_truncated.c
 
89
    test_read_uu.c
 
90
    test_tar_filenames.c
 
91
    test_tar_large.c
 
92
    test_ustar_filenames.c
 
93
    test_write_compress.c
 
94
    test_write_compress_bzip2.c
 
95
    test_write_compress_gzip.c
 
96
    test_write_compress_lzma.c
 
97
    test_write_compress_program.c
 
98
    test_write_compress_xz.c
 
99
    test_write_disk.c
 
100
    test_write_disk_failures.c
 
101
    test_write_disk_hardlink.c
 
102
    test_write_disk_perms.c
 
103
    test_write_disk_secure.c
 
104
    test_write_disk_sparse.c
 
105
    test_write_disk_symlink.c
 
106
    test_write_disk_times.c
 
107
    test_write_format_ar.c
 
108
    test_write_format_cpio.c
 
109
    test_write_format_cpio_empty.c
 
110
    test_write_format_cpio_odc.c
 
111
    test_write_format_cpio_newc.c
 
112
    test_write_format_mtree.c
 
113
    test_write_format_pax.c
 
114
    test_write_format_shar_empty.c
 
115
    test_write_format_tar.c
 
116
    test_write_format_tar_empty.c
 
117
    test_write_format_tar_ustar.c
 
118
    test_write_format_zip.c
 
119
    test_write_format_zip_empty.c
 
120
    test_write_format_zip_no_compression.c
 
121
    test_write_open_memory.c
 
122
  )
 
123
 
 
124
  #
 
125
  # Register target
 
126
  #
 
127
  ADD_EXECUTABLE(libarchive_test ${libarchive_test_SOURCES})
 
128
  TARGET_LINK_LIBRARIES(libarchive_test ${ADDITIONAL_LIBS})
 
129
  SET_PROPERTY(TARGET libarchive_test PROPERTY COMPILE_DEFINITIONS
 
130
    LIBARCHIVE_STATIC LIST_H)
 
131
 
 
132
  #
 
133
  # Generate list.h by grepping DEFINE_TEST() lines out of the C sources.
 
134
  #
 
135
  GENERATE_LIST_H(${CMAKE_CURRENT_BINARY_DIR}/list.h
 
136
    ${CMAKE_CURRENT_LIST_FILE} ${libarchive_test_SOURCES})
 
137
  SET_PROPERTY(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES
 
138
    ${CMAKE_CURRENT_BINARY_DIR})
 
139
 
 
140
  # list.h has a line DEFINE_TEST(testname) for every
 
141
  # test.  We can use that to define the tests for cmake by
 
142
  # defining a DEFINE_TEST macro and reading list.h in.
 
143
  MACRO (DEFINE_TEST _testname)
 
144
    ADD_TEST_28(
 
145
      NAME libarchive_${_testname}
 
146
      COMMAND libarchive_test -vv
 
147
                              -r ${CMAKE_CURRENT_SOURCE_DIR}
 
148
                              ${_testname})
 
149
  ENDMACRO (DEFINE_TEST _testname)
 
150
 
 
151
  INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/list.h)
 
152
 
 
153
  # Experimental new test handling
 
154
  ADD_CUSTOM_TARGET(run_libarchive_test
 
155
        COMMAND libarchive_test -r ${CMAKE_CURRENT_SOURCE_DIR})
 
156
  ADD_DEPENDENCIES(run_all_tests run_libarchive_test)
 
157
ENDIF(ENABLE_TEST)
 
158