diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2010-10-26 10:06:15 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-12-16 21:23:18 (GMT) |
commit | d95f817f77378021a067f9f2b4f286a12acb6cd8 (patch) | |
tree | 2e7d15a6e5d72a3d2f994316c0ff39ecff0c46e3 /Source | |
parent | 72ebd4ee12fc99b5302c18619f120bd9c285b474 (diff) | |
download | CMake-d95f817f77378021a067f9f2b4f286a12acb6cd8.zip CMake-d95f817f77378021a067f9f2b4f286a12acb6cd8.tar.gz CMake-d95f817f77378021a067f9f2b4f286a12acb6cd8.tar.bz2 |
Add the WORKING_DIRECTORY property to tests
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 5 | ||||
-rw-r--r-- | Source/cmTest.cxx | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 6dd348d..b8e38fb 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2190,7 +2190,6 @@ bool cmCTestTestHandler::SetTestsProperties( { rtit->Labels.push_back(*crit); } - } if ( key == "MEASUREMENT" ) { @@ -2219,6 +2218,10 @@ bool cmCTestTestHandler::SetTestsProperties( std::string(crit->c_str()))); } } + if ( key == "WORKING_DIRECTORY" ) + { + rtit->Directory = val; + } } } } diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx index 4e9b973..c25a8b6 100644 --- a/Source/cmTest.cxx +++ b/Source/cmTest.cxx @@ -196,4 +196,10 @@ void cmTest::DefineProperties(cmake *cm) "If set to true, this will invert the pass/fail flag of the test.", "This property can be used for tests that are expected to fail and " "return a non zero return code."); + + cm->DefineProperty + ("WORKING_DIRECTORY", cmProperty::TEST, + "The directory from which the test executable will be called.", + "If this is not set it is called from the directory the test executable " + "is located in."); } |