diff options
| author | Matthieu Darbois <mayeut@users.noreply.github.com> | 2015-07-30 18:13:15 +0200 |
|---|---|---|
| committer | Matthieu Darbois <mayeut@users.noreply.github.com> | 2015-07-30 18:13:15 +0200 |
| commit | 75a33de3bceb5a83888526911e48aed88bed1dbf (patch) | |
| tree | 786cac32059d88def19db6ab9aa0d75896a68c95 | |
| parent | f026c0541e43f8f7a7fa1b124647d4f6cfcd4964 (diff) | |
| parent | ae7953849b5b1fdce160e07f83881c31b5dd35e9 (diff) | |
Merge pull request #552 from mayeut/jpylyzer
Add jpylyzer tests for JP2 compression
| -rw-r--r-- | cmake/FindJPYLYZER.cmake | 12 | ||||
| -rw-r--r-- | tests/nonregression/CMakeLists.txt | 16 |
2 files changed, 28 insertions, 0 deletions
diff --git a/cmake/FindJPYLYZER.cmake b/cmake/FindJPYLYZER.cmake new file mode 100644 index 00000000..4fbbaa85 --- /dev/null +++ b/cmake/FindJPYLYZER.cmake @@ -0,0 +1,12 @@ +# +# this module looks for JPYLYZER +# http://jpylyzer.openpreservation.org +# + +find_program(JPYLYZER_EXECUTABLE + jpylyzer + ) + +mark_as_advanced( + JPYLYZER_EXECUTABLE + ) diff --git a/tests/nonregression/CMakeLists.txt b/tests/nonregression/CMakeLists.txt index f5b7e901..ab90f03b 100644 --- a/tests/nonregression/CMakeLists.txt +++ b/tests/nonregression/CMakeLists.txt @@ -13,6 +13,8 @@ set(INPUT_CONF_PATH ${OPJ_DATA_ROOT}/input/conformance) # need kdu_expand if possible find_package(KAKADU) +# need jpylyzer if possible +find_package(JPYLYZER) ######################################################################### # GENERATION OF THE TEST SUITE (DUMP) @@ -335,6 +337,20 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST}) NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-decode-ref) endif() + + # Test the encoded file is a valid JP2 file + if (JPYLYZER_EXECUTABLE) + if (${OUTPUT_FILENAME} MATCHES "\\.jp2$") + add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-jpylyser + COMMAND ${JPYLYZER_EXECUTABLE} + ${OUTPUT_FILENAME} + ) + set_tests_properties(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-jpylyser PROPERTIES + DEPENDS NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-encode + PASS_REGULAR_EXPRESSION "<isValidJP2>True</isValidJP2>" + ) + endif() + endif(JPYLYZER_EXECUTABLE) endif() # DECODER TEST SUITE |
