summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake')
-rw-r--r--Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
new file mode 100644
index 0000000..0aae06c
--- /dev/null
+++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
@@ -0,0 +1,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()