summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-01-28 18:17:10 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-01-28 18:17:10 (GMT)
commit9b8ca5853898a1671c08f4350471f3575da50b6d (patch)
tree6db71b8d7581f78fcfc60dc9f6e95bc841d636e7 /Source/cmCTest.cxx
parentc1002cccb06767712f939b813ed1136cabe3768d (diff)
downloadCMake-9b8ca5853898a1671c08f4350471f3575da50b6d.zip
CMake-9b8ca5853898a1671c08f4350471f3575da50b6d.tar.gz
CMake-9b8ca5853898a1671c08f4350471f3575da50b6d.tar.bz2
BUG: After running builtin ctest, go back to the original directory
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index eafb9fa..a053fbd 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2946,7 +2946,11 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, int *re
args.push_back(argv[i]);
}
}
+ std::string oldpath = cmSystemTools::GetCurrentWorkingDirectory();
+
*retVal = inst.Run(args, output);
+ cmSystemTools::ChangeDirectory(oldpath.c_str());
+
if(m_Verbose)
{
std::cout << "Internal cmCTest object used to run test.\n";