summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
blob: 0aae06cc731ccfd14f621a2f9c302bb5449bc383 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
set(testfile "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake")
if(EXISTS "${testfile}")
  file(READ "${testfile}" testfile_contents)
else()
  message(FATAL_ERROR "Could not find expected CTestTestfile.cmake.")
endif()
if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulator ^(pseudo_emulator)+$")
  message(SEND_ERROR "Used emulator when it should not be used.")
endif()
if(NOT testfile_contents MATCHES "add_test[(]UsesEmulator .+pseudo_emulator.+$")
  message(SEND_ERROR "Did not use emulator when it should be used.")
endif()