85 lines
7.7 KiB
Meson
85 lines
7.7 KiB
Meson
# Tests
|
|
# include_directories([openjpeg_binary_dir, '/src/lib/openjp2', openjpeg_binary_dir, '/src/bin/common', openjpeg_source_dir, '/src/lib/openjp2', openjpeg_source_dir, '/src/bin/jp2', openjpeg_source_dir, '/src/bin/common', z_include_dirname, png_include_dirname, tiff_include_dirname])
|
|
# First thing define the common source:
|
|
compare_images_srcs = ['compare_images.c', openjpeg_source_dir, '/src/bin/jp2/convert.c', openjpeg_source_dir, '/src/bin/jp2/converttif.c', openjpeg_source_dir, '/src/bin/common/opj_getopt.c']
|
|
compare_dump_files_srcs = ['compare_dump_files.c', openjpeg_source_dir, '/src/bin/common/opj_getopt.c']
|
|
compare_raw_files_srcs = ['compare_raw_files.c', openjpeg_source_dir, '/src/bin/common/opj_getopt.c']
|
|
compare_images_exe = executable('compare_images', compare_images_srcs)
|
|
# target_link_libraries(['compare_images', openjpeg_library_name, png_libname, tiff_libname])
|
|
compare_dump_files_exe = executable('compare_dump_files', compare_dump_files_srcs)
|
|
j2k_random_tile_access_exe = executable('j2k_random_tile_access', 'j2k_random_tile_access.c')
|
|
# target_link_libraries(['j2k_random_tile_access', openjpeg_library_name])
|
|
compare_raw_files_exe = executable('compare_raw_files', compare_raw_files_srcs)
|
|
test_tile_encoder_exe = executable('test_tile_encoder', 'test_tile_encoder.c')
|
|
# target_link_libraries(['test_tile_encoder', openjpeg_library_name])
|
|
test_decode_area_exe = executable('test_decode_area', 'test_decode_area.c')
|
|
# target_link_libraries(['test_decode_area', openjpeg_library_name])
|
|
# Let's try a couple of possibilities:
|
|
test('NAME', 'tte0', 'COMMAND', 'test_tile_encoder')
|
|
test('NAME', 'tte1', 'COMMAND', 'test_tile_encoder', '3', '2048', '2048', '1024', '1024', '8', '1', 'tte1.j2k')
|
|
test('NAME', 'tte2', 'COMMAND', 'test_tile_encoder', '3', '2048', '2048', '1024', '1024', '8', '1', 'tte2.jp2')
|
|
test('NAME', 'tte3', 'COMMAND', 'test_tile_encoder', '1', '2048', '2048', '1024', '1024', '8', '1', 'tte3.j2k')
|
|
test('NAME', 'tte4', 'COMMAND', 'test_tile_encoder', '1', '256', '256', '128', '128', '8', '0', 'tte4.j2k')
|
|
test('NAME', 'tte5', 'COMMAND', 'test_tile_encoder', '1', '512', '512', '256', '256', '8', '0', 'tte5.j2k')
|
|
#add_test(NAME tte6 COMMAND test_tile_encoder 1 8192 8192 512 512 8 0 tte6.j2k)
|
|
#add_test(NAME tte7 COMMAND test_tile_encoder 1 32768 32768 512 512 8 0 tte7.jp2)
|
|
test_tile_decoder_exe = executable('test_tile_decoder', 'test_tile_decoder.c')
|
|
# target_link_libraries(['test_tile_decoder', openjpeg_library_name])
|
|
test('NAME', 'ttd0', 'COMMAND', 'test_tile_decoder')
|
|
# set_property(['TEST', 'ttd0', 'APPEND', 'PROPERTY', 'DEPENDS', 'tte0'])
|
|
test('NAME', 'ttd1', 'COMMAND', 'test_tile_decoder', '0', '0', '1024', '1024', 'tte1.j2k')
|
|
# set_property(['TEST', 'ttd1', 'APPEND', 'PROPERTY', 'DEPENDS', 'tte1'])
|
|
test('NAME', 'ttd2', 'COMMAND', 'test_tile_decoder', '0', '0', '1024', '1024', 'tte2.jp2')
|
|
# set_property(['TEST', 'ttd2', 'APPEND', 'PROPERTY', 'DEPENDS', 'tte2'])
|
|
#add_test(NAME ttd6 COMMAND test_tile_decoder 0 0 512 512 tte6.j2k)
|
|
#set_property(TEST ttd6 APPEND PROPERTY DEPENDS tte6)
|
|
#add_test(NAME ttd7 COMMAND test_tile_decoder 0 0 512 512 tte7.jp2)
|
|
#set_property(TEST ttd7 APPEND PROPERTY DEPENDS tte7)
|
|
test('NAME', 'rta1', 'COMMAND', 'j2k_random_tile_access', 'tte1.j2k')
|
|
# set_property(['TEST', 'rta1', 'APPEND', 'PROPERTY', 'DEPENDS', 'tte1'])
|
|
test('NAME', 'rta2', 'COMMAND', 'j2k_random_tile_access', 'tte2.jp2')
|
|
# set_property(['TEST', 'rta2', 'APPEND', 'PROPERTY', 'DEPENDS', 'tte2'])
|
|
test('NAME', 'rta3', 'COMMAND', 'j2k_random_tile_access', 'tte3.j2k')
|
|
# set_property(['TEST', 'rta3', 'APPEND', 'PROPERTY', 'DEPENDS', 'tte3'])
|
|
test('NAME', 'rta4', 'COMMAND', 'j2k_random_tile_access', 'tte4.j2k')
|
|
# set_property(['TEST', 'rta4', 'APPEND', 'PROPERTY', 'DEPENDS', 'tte4'])
|
|
test('NAME', 'rta5', 'COMMAND', 'j2k_random_tile_access', 'tte5.j2k')
|
|
# set_property(['TEST', 'rta5', 'APPEND', 'PROPERTY', 'DEPENDS', 'tte5'])
|
|
test('NAME', 'tda_prep_reversible_no_precinct', 'COMMAND', 'test_tile_encoder', '1', '256', '256', '32', '32', '8', '0', 'reversible_no_precinct.j2k', '4', '4', '3', '0', '0', '1')
|
|
test('NAME', 'tda_reversible_no_precinct', 'COMMAND', 'test_decode_area', '-q', 'reversible_no_precinct.j2k')
|
|
# set_property(['TEST', 'tda_reversible_no_precinct', 'APPEND', 'PROPERTY', 'DEPENDS', 'tda_prep_reversible_no_precinct'])
|
|
test('NAME', 'tda_prep_reversible_203_201_17_19_no_precinct', 'COMMAND', 'test_tile_encoder', '1', '203', '201', '17', '19', '8', '0', 'reversible_203_201_17_19_no_precinct.j2k', '4', '4', '3', '0', '0', '1')
|
|
test('NAME', 'tda_reversible_203_201_17_19_no_precinct', 'COMMAND', 'test_decode_area', '-q', 'reversible_203_201_17_19_no_precinct.j2k')
|
|
# set_property(['TEST', 'tda_reversible_203_201_17_19_no_precinct', 'APPEND', 'PROPERTY', 'DEPENDS', 'tda_prep_reversible_203_201_17_19_no_precinct'])
|
|
test('NAME', 'tda_prep_reversible_with_precinct', 'COMMAND', 'test_tile_encoder', '1', '256', '256', '32', '32', '8', '0', 'reversible_with_precinct.j2k', '4', '4', '3', '0', '0', '1', '16', '16')
|
|
test('NAME', 'tda_reversible_with_precinct', 'COMMAND', 'test_decode_area', '-q', 'reversible_with_precinct.j2k')
|
|
# set_property(['TEST', 'tda_reversible_with_precinct', 'APPEND', 'PROPERTY', 'DEPENDS', 'tda_prep_reversible_with_precinct'])
|
|
test('NAME', 'tda_prep_irreversible_no_precinct', 'COMMAND', 'test_tile_encoder', '1', '256', '256', '32', '32', '8', '1', 'irreversible_no_precinct.j2k', '4', '4', '3', '0', '0', '1')
|
|
test('NAME', 'tda_irreversible_no_precinct', 'COMMAND', 'test_decode_area', '-q', 'irreversible_no_precinct.j2k')
|
|
# set_property(['TEST', 'tda_irreversible_no_precinct', 'APPEND', 'PROPERTY', 'DEPENDS', 'tda_prep_irreversible_no_precinct'])
|
|
test('NAME', 'tda_prep_irreversible_203_201_17_19_no_precinct', 'COMMAND', 'test_tile_encoder', '1', '203', '201', '17', '19', '8', '1', 'irreversible_203_201_17_19_no_precinct.j2k', '4', '4', '3', '0', '0', '1')
|
|
test('NAME', 'tda_irreversible_203_201_17_19_no_precinct', 'COMMAND', 'test_decode_area', '-q', 'irreversible_203_201_17_19_no_precinct.j2k')
|
|
# set_property(['TEST', 'tda_irreversible_203_201_17_19_no_precinct', 'APPEND', 'PROPERTY', 'DEPENDS', 'tda_prep_irreversible_203_201_17_19_no_precinct'])
|
|
test('NAME', 'tda_prep_strip', 'COMMAND', 'test_tile_encoder', '1', '256', '256', '256', '256', '8', '0', 'tda_single_tile.j2k')
|
|
test('NAME', 'tda_strip', 'COMMAND', 'test_decode_area', '-q', '-strip_height', '3', '-strip_check', 'tda_single_tile.j2k')
|
|
# set_property(['TEST', 'tda_strip', 'APPEND', 'PROPERTY', 'DEPENDS', 'tda_prep_strip'])
|
|
include_openjpeg_exe = executable('include_openjpeg', 'include_openjpeg.c')
|
|
# No image send to the dashboard if lib PNG is not available.
|
|
if 'NOT', 'OPJ_HAVE_LIBPNG'
|
|
# message(['WARNING', 'Lib PNG seems to be not available: if you want run the non-regression tests with images reported to the dashboard, you need it (try BUILD_THIRDPARTY)'])
|
|
endif
|
|
subdir('conformance')
|
|
subdir('nonregression')
|
|
subdir('unit')
|
|
if get_option('build_jpip')
|
|
if get_option('build_jpip_server')
|
|
#set(s "http://jpip.example.com/myFCGI?target=16.jp2&fsiz=170,170&cnew=http&type=jpp-stream")
|
|
s = '${JPIP_SERVER}?target=16.jp2&fsiz=170,170&cnew=http&type=jpp-stream'
|
|
p = '${CMAKE_CURRENT_BINARY_DIR}/jpip.dat'
|
|
md5 = 'd41d8cd98f00b204e9800998ecf8427e'
|
|
test('NAME', 'TestJPIP1', 'COMMAND', cmake_command, '-DD_URL:STRING=${s}', '-DD_FILE:PATH=${p}', '-DEXPECTED_MD5=${md5}', '-P', project_source_dir, '/cmake/JPIPTestDriver.cmake')
|
|
endif
|
|
endif
|
|
ppm2rgb3_exe = executable('ppm2rgb3', 'ppm2rgb3.c')
|
|
#add_executable(pdf2jp2 pdf2jp2.c)
|