1set(RESULT_FILES
2  "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/cases.case/0.xml"
3  "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/cases.case/1.xml"
4  "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/cases.case/2.xml"
5)
6
7# Check result files exist
8foreach(file ${RESULT_FILES})
9  if(NOT EXISTS ${file})
10    if(NOT ${RunCMake_TEST_FAILED} STREQUAL "")
11      set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}\n")
12    endif()
13    set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}Result XML file ${file} was not created")
14  endif()
15endforeach()
16
17# and no other xml files are created
18file(GLOB_RECURSE file_list "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/*/*.xml" LIST_DIRECTORIES false)
19
20foreach(file ${file_list})
21  list(FIND RESULT_FILES "${file}" idx)
22  if(-1 EQUAL ${idx})
23    if(NOT ${RunCMake_TEST_FAILED} STREQUAL "")
24      set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}\n")
25    endif()
26    set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}Invalid file ${file} was created")
27  endif()
28endforeach()
29