[trunk] add mecanism to track of addition of new regression files in svn/data. It will report when a J2K files is added but no test is found in the test_suite file
This commit is contained in:
parent
a43d206b93
commit
b607da8ae9
|
@ -47,6 +47,7 @@ file(GLOB_RECURSE OPJ_DATA_NR_LIST
|
||||||
"${INPUT_NR}/*.j2k"
|
"${INPUT_NR}/*.j2k"
|
||||||
"${INPUT_NR}/*.j2c"
|
"${INPUT_NR}/*.j2c"
|
||||||
"${INPUT_NR}/*.jp2"
|
"${INPUT_NR}/*.jp2"
|
||||||
|
"${INPUT_NR}/*.jpc"
|
||||||
#"${INPUT_NR}/*.jpx"
|
#"${INPUT_NR}/*.jpx"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -133,6 +134,7 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
set(nonregression_filenames_used)
|
||||||
# Parse the command line found in the file(s)
|
# Parse the command line found in the file(s)
|
||||||
set(IT_TEST_ENC 0)
|
set(IT_TEST_ENC 0)
|
||||||
set(IT_TEST_DEC 0)
|
set(IT_TEST_DEC 0)
|
||||||
|
@ -240,7 +242,6 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
|
||||||
#-----
|
#-----
|
||||||
# Now we can add the test suite corresponding to a line command in the file
|
# Now we can add the test suite corresponding to a line command in the file
|
||||||
#-----
|
#-----
|
||||||
|
|
||||||
# ENCODER TEST SUITE
|
# ENCODER TEST SUITE
|
||||||
if(ENC_TEST_FOUND)
|
if(ENC_TEST_FOUND)
|
||||||
math(EXPR IT_TEST_ENC "${IT_TEST_ENC}+1" )
|
math(EXPR IT_TEST_ENC "${IT_TEST_ENC}+1" )
|
||||||
|
@ -304,6 +305,10 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
|
||||||
|
|
||||||
# DECODER TEST SUITE
|
# DECODER TEST SUITE
|
||||||
else()
|
else()
|
||||||
|
string(FIND ${INPUT_FILENAME} "nonregression" nr_pos)
|
||||||
|
if(${nr_pos} GREATER 0)
|
||||||
|
list(APPEND nonregression_filenames_used ${INPUT_FILENAME_NAME})
|
||||||
|
endif()
|
||||||
math(EXPR IT_TEST_DEC "${IT_TEST_DEC}+1" )
|
math(EXPR IT_TEST_DEC "${IT_TEST_DEC}+1" )
|
||||||
|
|
||||||
# Decode the input image
|
# Decode the input image
|
||||||
|
@ -349,3 +354,18 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
set(existing_filenames)
|
||||||
|
foreach(f ${OPJ_DATA_NR_LIST})
|
||||||
|
get_filename_component(ff ${f} NAME)
|
||||||
|
list(APPEND existing_filenames ${ff})
|
||||||
|
endforeach()
|
||||||
|
list(REMOVE_ITEM existing_filenames ${nonregression_filenames_used})
|
||||||
|
|
||||||
|
# keep track of new addition:
|
||||||
|
# if we reach here, then a J2K files was added but no test is present in
|
||||||
|
# test_suite.ctest.in:
|
||||||
|
foreach(found_but_no_test ${existing_filenames})
|
||||||
|
add_test(NAME Found-But-No-Test-${found_but_no_test} COMMAND ${CMAKE_COMMAND} -E echo "${found_but_no_test}")
|
||||||
|
set_tests_properties(Found-But-No-Test-${found_but_no_test} PROPERTIES WILL_FAIL TRUE)
|
||||||
|
endforeach()
|
||||||
|
|
Loading…
Reference in New Issue