Matt McCormick 9160d6c241 TestGenerator: Add CROSSCOMPILING_EMULATOR support.
Prefix test commands with the CROSSCOMPILING_EMULATOR property
for target executables. This allows test suites to be run on the host
when crosscompiling.
2015-04-08 09:06:22 -04:00

13 lines
534 B
CMake

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()