From 62f6bce7a543a38965bfc2596afcd559e9fb7ee9 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 2 May 2012 10:45:06 -0400 Subject: Use a script to run the test because WORKING_DIRECTORY is not in 2.8.2. add_test with WORKING_DIRECTORY is too new to use in cmake. This change uses a configured script to run the command in the right directory. --- Tests/MumpsCoverage/RunTest.ctest.in | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Tests/MumpsCoverage/RunTest.ctest.in (limited to 'Tests/MumpsCoverage') diff --git a/Tests/MumpsCoverage/RunTest.ctest.in b/Tests/MumpsCoverage/RunTest.ctest.in new file mode 100644 index 0000000000..3f9022a6d5 --- /dev/null +++ b/Tests/MumpsCoverage/RunTest.ctest.in @@ -0,0 +1,8 @@ +execute_process(COMMAND "@CMAKE_CTEST_COMMAND@" -T Coverage --debug + WORKING_DIRECTORY "@CMake_BINARY_DIR@/Testing/@_MUMPS_TEST_DIR@" + RESULT_VARIABLE RES) +if(${RES} EQUAL 0) + message("Test passed") +else() + message(FATAL_ERROR "Error code running ctest=${RES}") +endif() -- cgit v1.2.1