Skip to content
Snippets Groups Projects
Commit a4d55cea authored by Lars Bilke's avatar Lars Bilke
Browse files

[CTest] Added check for DIFF_DATA length.

On Windows the maximum cmd length is 8192 chars.
parent 43b890f9
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,13 @@ function (AddTest)
return()
endif()
if(AddTest_DIFF_DATA)
string(LENGTH "${AddTest_DIFF_DATA}" DIFF_DATA_LENGTH)
if(${DIFF_DATA_LENGTH} GREATER 7500)
message(FATAL_ERROR "${AddTest_NAME}: DIFF_DATA to long! Consider using regex-syntax: TODO")
endif()
endif()
if((AddTest_TESTER STREQUAL "diff" OR AddTest_TESTER STREQUAL "vtkdiff") AND NOT AddTest_DIFF_DATA)
message(FATAL_ERROR "AddTest(): ${AddTest_NAME} - no DIFF_DATA given!")
endif()
......@@ -130,7 +137,6 @@ function (AddTest)
${TESTER_ARGS} ${AddTest_SOURCE_PATH}/${FILE_EXPECTED} \
${AddTest_BINARY_PATH}/${FILE}")
endforeach()
string(REPLACE ";" " && " TESTER_COMMAND "${TESTER_COMMAND}")
elseif(AddTest_TESTER STREQUAL "vtkdiff")
list(LENGTH AddTest_DIFF_DATA DiffDataLength)
math(EXPR DiffDataLengthMod4 "${DiffDataLength} % 4")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment