[trunk] Prefer the new style cmake: add_test command

Fixes issues 258
This commit is contained in:
Mathieu Malaterre 2014-02-24 12:48:23 +00:00
parent 33d8f08964
commit 9efad43509
4 changed files with 64 additions and 64 deletions

View File

@ -45,38 +45,38 @@ add_executable(test_tile_encoder test_tile_encoder.c)
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.
@ -94,7 +94,7 @@ if(BUILD_JPIP)
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()

View File

@ -327,15 +327,15 @@ foreach(numFileC1P0 RANGE 1 16)
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}
@ -348,8 +348,8 @@ foreach(numFileC1P0 RANGE 1 16)
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}
@ -384,15 +384,15 @@ foreach(numFileC1P1 RANGE 1 7)
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}
@ -405,8 +405,8 @@ foreach(numFileC1P1 RANGE 1 7)
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}
@ -437,8 +437,8 @@ foreach(numFileJP2 RANGE 1 9)
# 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
)
@ -489,14 +489,14 @@ foreach(numFileP0 RANGE 1 16)
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
)
@ -518,14 +518,14 @@ foreach(numFileP1 RANGE 1 7)
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
)
@ -547,14 +547,14 @@ foreach(numFileJP2 RANGE 1 9)
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
)

View File

@ -43,8 +43,8 @@ foreach(INPUT_FILENAME ${OPJ_DATA_NR_LIST})
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
@ -57,8 +57,8 @@ foreach(INPUT_FILENAME ${OPJ_DATA_NR_LIST})
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
)
@ -229,8 +229,8 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
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}
)
@ -239,8 +239,8 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
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
)
@ -249,8 +249,8 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
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
)
@ -261,8 +261,8 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
# 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
)
@ -272,8 +272,8 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
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
)
@ -290,8 +290,8 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
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}
)

View File

@ -13,6 +13,6 @@ target_link_libraries(testempty0 openjp2)
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)