summaryrefslogtreecommitdiff
path: root/Tests/MumpsCoverage
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2012-05-02 10:45:06 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2012-05-02 10:45:06 -0400
commit62f6bce7a543a38965bfc2596afcd559e9fb7ee9 (patch)
tree8b133649b69819fe10385f4843d5b071e8aaca32 /Tests/MumpsCoverage
parentf5c5db0753161726c6032178bb10eb41b1ddde02 (diff)
downloadcmake-62f6bce7a543a38965bfc2596afcd559e9fb7ee9.tar.gz
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.
Diffstat (limited to 'Tests/MumpsCoverage')
-rw-r--r--Tests/MumpsCoverage/RunTest.ctest.in8
1 files changed, 8 insertions, 0 deletions
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()