diff options
-rw-r--r-- | Source/cmCTest.cxx | 4 |
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"; |