diff options
| author | Mickael Savinaud <savmickael@users.noreply.github.com> | 2011-08-31 13:33:40 +0000 |
|---|---|---|
| committer | Mickael Savinaud <savmickael@users.noreply.github.com> | 2011-08-31 13:33:40 +0000 |
| commit | aaa47850c3c4da2fc7dde0ef6371c97f9e7e36c7 (patch) | |
| tree | 61ab203fc3375336d252b3b5fd3f25229cd49e9b /tests/nonregression | |
| parent | 7c2feb78d25d81bd78d51ddaa9447c7af41d4c88 (diff) | |
enhance the encoding test suite and remove unsued CONFIGURE_FILE into a CMakeList
Diffstat (limited to 'tests/nonregression')
| -rw-r--r-- | tests/nonregression/CMakeLists.txt | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/tests/nonregression/CMakeLists.txt b/tests/nonregression/CMakeLists.txt index 55ee64ad..e9c00dd4 100644 --- a/tests/nonregression/CMakeLists.txt +++ b/tests/nonregression/CMakeLists.txt @@ -75,12 +75,13 @@ IF (NOT WIN32) CONFIGURE_FILE("opj_ref_decode_cmd.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/opj_ref_decode_cmd.sh" @ONLY) -ELSE (NOT WIN32) - -CONFIGURE_FILE("opj_ref_decode_cmd.bat.in" - "${CMAKE_CURRENT_BINARY_DIR}/opj_ref_decode_cmd.bat" - @ONLY) ENDIF (NOT WIN32) + +string(COMPARE EQUAL ${REF_DECODER_BIN_PATH} "NOTFOUND" REF_DECODER_NOTFOUND) +IF (REF_DECODER_NOTFOUND) + MESSAGE(STATUS "REF_DECODER_BIN_PATH not found, if you want all the encoding tests suite please provide a ragular path") +ENDIF (REF_DECODER_NOTFOUND) + # Read the file into a list FILE(STRINGS encoder_test_suite.txt OPJ_TEST_ENC_CMD_LINE_LIST) @@ -183,13 +184,11 @@ FOREACH(OPJ_TEST_ENC_CMD_LINE ${OPJ_TEST_ENC_CMD_LINE_LIST}) NR-ENC-${INPUT_FILENAME_NAME}-${it_test}-dump) # Decode the encoding file with kakadu expand command - string(COMPARE EQUAL ${REF_DECODER_BIN_PATH} "NOTFOUND" REF_DECODER_NOTFOUND) - IF (NOT REF_DECODER_NOTFOUND) IF (NOT WIN32) # Need a bash script to export the path of the kakadu library into PATH - ADD_TEST(NAME NR-ENC-${INPUT_FILENAME_NAME}-${it_test}-decode-ref - COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/opj_ref_decode_cmd.sh + ADD_TEST( NR-ENC-${INPUT_FILENAME_NAME}-${it_test}-decode-ref + bash ${CMAKE_CURRENT_BINARY_DIR}/opj_ref_decode_cmd.sh -i ${OUTPUT_FILENAME} -o ${OUTPUT_FILENAME}.raw ) @@ -204,15 +203,20 @@ FOREACH(OPJ_TEST_ENC_CMD_LINE ${OPJ_TEST_ENC_CMD_LINE_LIST}) SET_TESTS_PROPERTIES(NR-ENC-${INPUT_FILENAME_NAME}-${it_test}-decode-ref PROPERTIES DEPENDS NR-ENC-${INPUT_FILENAME_NAME}-${it_test}-encode) - ELSE (NOT REF_DECODER_NOTFOUND) - MESSAGE(STATUS "REF_DECODER_BIN_PATH not found, if you want all the encoding tests suite please provide a ragular path") - ENDIF (NOT REF_DECODER_NOTFOUND) - # Compare the decoding file with baseline generated from the kdu_expand and baseline.j2k - #ADD_TEST(NR-ENC-${it_test}-compare_expand - # -b ${BASELINE_NR}/.raw - # -t ${TEMP}/${OUTPUT_FILENAME}.raw - #) + # Compare the decoding file with baseline generated from the kdu_expand and baseline.j2k + ADD_TEST(NR-ENC-${INPUT_FILENAME_NAME}-${it_test}-compare_dec-ref-out2base + ${EXECUTABLE_OUTPUT_PATH}/compareRAWimages + #-b ${BASELINE_NR}/opj_${OUTPUT_FILENAME_NAME_WE}-ENC-${it_test}.raw + -b ${BASELINE_NR}/opj_${OUTPUT_FILENAME_NAME_WE}-ENC-${it_test}.raw + -t ${OUTPUT_FILENAME}.raw + ) + + SET_TESTS_PROPERTIES(NR-ENC-${INPUT_FILENAME_NAME}-${it_test}-compare_dec-ref-out2base + PROPERTIES DEPENDS + NR-ENC-${INPUT_FILENAME_NAME}-${it_test}-decode-ref) + + ENDIF (NOT REF_DECODER_NOTFOUND) ENDIF(NOT IGNORE_LINE_FOUND) |
