target_link_libraries(test_tile_encoder ${OPENJPEG_LIBRARY_NAME})
# Let's try a couple of possibilities:
-add_test(tte0 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder)
-add_test(tte1 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 3 2048 2048 1024 1024 8 1 tte1.j2k)
-add_test(tte2 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 3 2048 2048 1024 1024 8 1 tte2.jp2)
-add_test(tte3 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 2048 2048 1024 1024 8 1 tte3.j2k)
-add_test(tte4 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 256 256 128 128 8 0 tte4.j2k)
-add_test(tte5 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 512 512 256 256 8 0 tte5.j2k)
-#add_test(tte6 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 8192 8192 512 512 8 0 tte6.j2k)
-#add_test(tte7 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 32768 32768 512 512 8 0 tte7.jp2)
+add_test(NAME tte0 COMMAND test_tile_encoder)
+add_test(NAME tte1 COMMAND test_tile_encoder 3 2048 2048 1024 1024 8 1 tte1.j2k)
+add_test(NAME tte2 COMMAND test_tile_encoder 3 2048 2048 1024 1024 8 1 tte2.jp2)
+add_test(NAME tte3 COMMAND test_tile_encoder 1 2048 2048 1024 1024 8 1 tte3.j2k)
+add_test(NAME tte4 COMMAND test_tile_encoder 1 256 256 128 128 8 0 tte4.j2k)
+add_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)
add_executable(test_tile_decoder test_tile_decoder.c)
target_link_libraries(test_tile_decoder ${OPENJPEG_LIBRARY_NAME})
-add_test(ttd0 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder)
+add_test(NAME ttd0 COMMAND test_tile_decoder)
set_property(TEST ttd0 APPEND PROPERTY DEPENDS tte0)
-add_test(ttd1 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 1024 1024 tte1.j2k)
+add_test(NAME ttd1 COMMAND test_tile_decoder 0 0 1024 1024 tte1.j2k)
set_property(TEST ttd1 APPEND PROPERTY DEPENDS tte1)
-add_test(ttd2 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 1024 1024 tte2.jp2)
+add_test(NAME ttd2 COMMAND test_tile_decoder 0 0 1024 1024 tte2.jp2)
set_property(TEST ttd2 APPEND PROPERTY DEPENDS tte2)
-#add_test(ttd6 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 512 512 tte6.j2k)
+#add_test(NAME ttd6 COMMAND test_tile_decoder 0 0 512 512 tte6.j2k)
#set_property(TEST ttd6 APPEND PROPERTY DEPENDS tte6)
-#add_test(ttd7 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 512 512 tte7.jp2)
+#add_test(NAME ttd7 COMMAND test_tile_decoder 0 0 512 512 tte7.jp2)
#set_property(TEST ttd7 APPEND PROPERTY DEPENDS tte7)
-add_test(rta1 ${EXECUTABLE_OUTPUT_PATH}/j2k_random_tile_access tte1.j2k)
+add_test(NAME rta1 COMMAND j2k_random_tile_access tte1.j2k)
set_property(TEST rta1 APPEND PROPERTY DEPENDS tte1)
-add_test(rta2 ${EXECUTABLE_OUTPUT_PATH}/j2k_random_tile_access tte2.jp2)
+add_test(NAME rta2 COMMAND j2k_random_tile_access tte2.jp2)
set_property(TEST rta2 APPEND PROPERTY DEPENDS tte2)
-add_test(rta3 ${EXECUTABLE_OUTPUT_PATH}/j2k_random_tile_access tte3.j2k)
+add_test(NAME rta3 COMMAND j2k_random_tile_access tte3.j2k)
set_property(TEST rta3 APPEND PROPERTY DEPENDS tte3)
-add_test(rta4 ${EXECUTABLE_OUTPUT_PATH}/j2k_random_tile_access tte4.j2k)
+add_test(NAME rta4 COMMAND j2k_random_tile_access tte4.j2k)
set_property(TEST rta4 APPEND PROPERTY DEPENDS tte4)
-add_test(rta5 ${EXECUTABLE_OUTPUT_PATH}/j2k_random_tile_access tte5.j2k)
+add_test(NAME rta5 COMMAND j2k_random_tile_access tte5.j2k)
set_property(TEST rta5 APPEND PROPERTY DEPENDS tte5)
# No image send to the dashboard if lib PNG is not available.
set(s "${JPIP_SERVER}?target=16.jp2&fsiz=170,170&cnew=http&type=jpp-stream")
set(p "${CMAKE_CURRENT_BINARY_DIR}/jpip.dat")
set(md5 "62b00c620fb0a600c5ffd413cada4674")
- add_test(TestJPIP1 ${CMAKE_COMMAND} -DD_URL:STRING=${s} -DD_FILE:PATH=${p}
+ add_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()
list(GET C1P0_PEAK_list ${numFileC1P0} PEAK_limit)
list(GET C1P0_MSE_list ${numFileC1P0} MSE_limit)
- add_test(ETS-C1P0-${filenameInput}-decode
- ${EXECUTABLE_OUTPUT_PATH}/opj_decompress
+ add_test(NAME ETS-C1P0-${filenameInput}-decode
+ COMMAND opj_decompress
-i ${INPUT_CONF}/${filenameInput}
-o ${TEMP}/c1${filenameInput}.pgx
-r ${ResFactor}
)
- add_test(ETS-C1P0-${filenameInput}-compare2ref
- ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
+ add_test(NAME ETS-C1P0-${filenameInput}-compare2ref
+ COMMAND comparePGXimages
-b ${BASELINE_CONF}/${filenameRef}
-t ${TEMP}/c1${filenameInput}.pgx
-n ${nbComponents}
PROPERTIES DEPENDS
ETS-C1P0-${filenameInput}-decode)
- add_test(NR-C1P0-${filenameInput}-compare2base
- ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
+ add_test(NAME NR-C1P0-${filenameInput}-compare2base
+ COMMAND comparePGXimages
-b ${BASELINE_NR}/opj_${filenameRef}
-t ${TEMP}/c1${filenameInput}.pgx
-n ${nbComponents}
list(GET C1P1_PEAK_list ${numFileC1P1} PEAK_limit)
list(GET C1P1_MSE_list ${numFileC1P1} MSE_limit)
- add_test(ETS-C1P1-${filenameInput}-decode
- ${EXECUTABLE_OUTPUT_PATH}/opj_decompress
+ add_test(NAME ETS-C1P1-${filenameInput}-decode
+ COMMAND opj_decompress
-i ${INPUT_CONF}/${filenameInput}
-o ${TEMP}/c1${filenameInput}.pgx
-r 0
)
- add_test(ETS-C1P1-${filenameInput}-compare2ref
- ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
+ add_test(NAME ETS-C1P1-${filenameInput}-compare2ref
+ COMMAND comparePGXimages
-b ${BASELINE_CONF}/${filenameRef}
-t ${TEMP}/c1${filenameInput}.pgx
-n ${nbComponents}
PROPERTIES DEPENDS
ETS-C1P1-${filenameInput}-decode)
- add_test(NR-C1P1-${filenameInput}-compare2base
- ${EXECUTABLE_OUTPUT_PATH}/comparePGXimages
+ add_test(NAME NR-C1P1-${filenameInput}-compare2base
+ COMMAND comparePGXimages
-b ${BASELINE_NR}/opj_${filenameRef}
-t ${TEMP}/c1${filenameInput}.pgx
-n ${nbComponents}
# Get corresponding tests parameters
list(GET JP2_PEAK_list ${numFileJP2} PEAK_limit)
- add_test(ETS-JP2-${filenameInput}-decode
- ${EXECUTABLE_OUTPUT_PATH}/opj_decompress
+ add_test(NAME ETS-JP2-${filenameInput}-decode
+ COMMAND opj_decompress
-i ${INPUT_CONF}/${filenameInput}
-o ${TEMP}/${filenameInput}.tif
)
get_filename_component(filenameRefSub ${filenameInput} NAME_WE)
- add_test(NR-${filenameInput}-dump
- ${EXECUTABLE_OUTPUT_PATH}/opj_dump
+ add_test(NAME NR-${filenameInput}-dump
+ COMMAND opj_dump
-i ${INPUT_CONF}/${filenameInput}
-o ${TEMP}/${filenameInput}.txt
)
- add_test(NR-${filenameInput}-compare_dump2base
- ${EXECUTABLE_OUTPUT_PATH}/compare_dump_files
+ add_test(NAME NR-${filenameInput}-compare_dump2base
+ COMMAND compare_dump_files
-b ${BASELINE_NR}/opj_v2_${filenameRefSub}.txt
-t ${TEMP}/${filenameInput}.txt
)
set( filenameInput p1_0${numFileP1}.j2k )
get_filename_component(filenameInputSub ${filenameInput} NAME_WE)
- add_test(NR-${filenameInput}-dump
- ${EXECUTABLE_OUTPUT_PATH}/opj_dump
+ add_test(NAME NR-${filenameInput}-dump
+ COMMAND opj_dump
-i ${INPUT_CONF}/${filenameInput}
-o ${TEMP}/${filenameInput}.txt
)
- add_test(NR-${filenameInput}-compare_dump2base
- ${EXECUTABLE_OUTPUT_PATH}/compare_dump_files
+ add_test(NAME NR-${filenameInput}-compare_dump2base
+ COMMAND compare_dump_files
-b ${BASELINE_NR}/opj_v2_${filenameInputSub}.txt
-t ${TEMP}/${filenameInput}.txt
)
set( filenameInput "file${numFileJP2}.jp2" )
get_filename_component(filenameInputSub ${filenameInput} NAME_WE)
- add_test(NR-${filenameInput}-dump
- ${EXECUTABLE_OUTPUT_PATH}/opj_dump
+ add_test(NAME NR-${filenameInput}-dump
+ COMMAND opj_dump
-i ${INPUT_CONF}/${filenameInput}
-o ${TEMP}/${filenameInput}.txt
)
- add_test(NR-${filenameInput}-compare_dump2base
- ${EXECUTABLE_OUTPUT_PATH}/compare_dump_files
+ add_test(NAME NR-${filenameInput}-compare_dump2base
+ COMMAND compare_dump_files
-b ${BASELINE_NR}/opj_v2_${filenameInputSub}.txt
-t ${TEMP}/${filenameInput}.txt
)
string(REGEX MATCH ${INPUT_FILENAME_NAME} bad_jpeg2000 ${BLACKLIST_JPEG2000})
# Dump the input image
- add_test(NR-${INPUT_FILENAME_NAME}-dump
- ${EXECUTABLE_OUTPUT_PATH}/opj_dump
+ add_test(NAME NR-${INPUT_FILENAME_NAME}-dump
+ COMMAND opj_dump
-i ${INPUT_FILENAME}
-o ${TEMP}/${INPUT_FILENAME_NAME}.txt
-v
else()
# Compare the dump output with the baseline
- add_test(NR-${INPUT_FILENAME_NAME}-compare_dump2base
- ${EXECUTABLE_OUTPUT_PATH}/compare_dump_files
+ add_test(NAME NR-${INPUT_FILENAME_NAME}-compare_dump2base
+ COMMAND compare_dump_files
-b ${BASELINE_NR}/opj_v2_${INPUT_FILENAME_NAME_WE}.txt
-t ${TEMP}/${INPUT_FILENAME_NAME}.txt
)
math(EXPR IT_TEST_ENC "${IT_TEST_ENC}+1" )
# Encode an image into the jpeg2000 format
- add_test(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-encode
- ${EXECUTABLE_OUTPUT_PATH}/opj_compress
+ add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-encode
+ COMMAND opj_compress
${CMD_ARG_LIST_2}
)
else()
# Dump the encoding file
- add_test(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-dump
- ${EXECUTABLE_OUTPUT_PATH}/opj_dump
+ add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-dump
+ COMMAND opj_dump
-i ${OUTPUT_FILENAME}
-o ${OUTPUT_FILENAME}-ENC-${IT_TEST_ENC}.txt
)
NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-encode)
# Compare the dump file with the baseline
- add_test(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-compare_dump2base
- ${EXECUTABLE_OUTPUT_PATH}/compare_dump_files
+ add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-compare_dump2base
+ COMMAND compare_dump_files
-b ${BASELINE_NR}/opj_v2_${OUTPUT_FILENAME_NAME_WE}-ENC-${IT_TEST_ENC}.txt
-t ${OUTPUT_FILENAME}-ENC-${IT_TEST_ENC}.txt
)
# Decode the encoding file with kakadu expand command
if (KDU_EXPAND_EXECUTABLE)
- add_test(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-decode-ref
- ${KDU_EXPAND_EXECUTABLE}
+ add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-decode-ref
+ COMMAND ${KDU_EXPAND_EXECUTABLE}
-i ${OUTPUT_FILENAME}
-o ${OUTPUT_FILENAME}.raw
)
NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-encode)
# Compare the decoding file with baseline generated from the kdu_expand and baseline.j2k
- add_test(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-compare_dec-ref-out2base
- ${EXECUTABLE_OUTPUT_PATH}/compareRAWimages
+ add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-compare_dec-ref-out2base
+ COMMAND compareRAWimages
-b ${BASELINE_NR}/opj_${OUTPUT_FILENAME_NAME_WE}-ENC-${IT_TEST_ENC}.raw
-t ${OUTPUT_FILENAME}.raw
)
math(EXPR IT_TEST_DEC "${IT_TEST_DEC}+1" )
# Decode the input image
- add_test(NR-DEC-${INPUT_FILENAME_NAME}-${IT_TEST_DEC}-decode
- ${EXECUTABLE_OUTPUT_PATH}/opj_decompress
+ add_test(NAME NR-DEC-${INPUT_FILENAME_NAME}-${IT_TEST_DEC}-decode
+ COMMAND opj_decompress
${CMD_ARG_LIST_2}
)
target_link_libraries(testempty1 openjp2)
target_link_libraries(testempty2 openjp2)
-add_test(testempty0 ${EXECUTABLE_OUTPUT_PATH}/testempty0)
-add_test(testempty1 ${EXECUTABLE_OUTPUT_PATH}/testempty1)
-add_test(testempty2 ${EXECUTABLE_OUTPUT_PATH}/testempty2)
+add_test(NAME testempty0 COMMAND testempty0)
+add_test(NAME testempty1 COMMAND testempty1)
+add_test(NAME testempty2 COMMAND testempty2)