1
0

AddTest-check.cmake 534 B

123456789101112
  1. set(testfile "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake")
  2. if(EXISTS "${testfile}")
  3. file(READ "${testfile}" testfile_contents)
  4. else()
  5. message(FATAL_ERROR "Could not find expected CTestTestfile.cmake.")
  6. endif()
  7. if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulator ^(pseudo_emulator)+$")
  8. message(SEND_ERROR "Used emulator when it should not be used.")
  9. endif()
  10. if(NOT testfile_contents MATCHES "add_test[(]UsesEmulator .+pseudo_emulator.+$")
  11. message(SEND_ERROR "Did not use emulator when it should be used.")
  12. endif()