diff options
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 559275e..f469998 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2,15 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTest.h" -#include <cm_curl.h> -#include <cm_zlib.h> -#include <cmsys/Base64.h> -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/Process.h> -#include <cmsys/String.hxx> -#include <cmsys/SystemInformation.hxx> +#include "cm_curl.h" +#include "cm_zlib.h" +#include "cmsys/Base64.h" +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" +#include "cmsys/Process.h" +#include "cmsys/String.hxx" +#include "cmsys/SystemInformation.hxx" #include <ctype.h> #include <iostream> #include <map> @@ -416,7 +416,7 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command) } } - cmake cm; + cmake cm(cmake::RoleScript); cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cm.GetCurrentSnapshot().SetDefaultDefinitions(); @@ -1122,7 +1122,6 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, if (log) { *log << "* Run internal CTest" << std::endl; } - std::string oldpath = cmSystemTools::GetCurrentWorkingDirectory(); CM_AUTO_PTR<cmSystemTools::SaveRestoreEnvironment> saveEnv; if (modifyEnv) { @@ -1137,7 +1136,6 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, if (log && output) { *log << *output; } - cmSystemTools::ChangeDirectory(oldpath); if (output) { cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Internal cmCTest object used to run test." << std::endl @@ -1901,6 +1899,34 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, ->SetPersistentOption("ExcludeRegularExpression", args[i].c_str()); } + if (this->CheckArgument(arg, "-FA", "--fixture-exclude-any") && + i < args.size() - 1) { + i++; + this->GetHandler("test")->SetPersistentOption( + "ExcludeFixtureRegularExpression", args[i].c_str()); + this->GetHandler("memcheck") + ->SetPersistentOption("ExcludeFixtureRegularExpression", + args[i].c_str()); + } + if (this->CheckArgument(arg, "-FS", "--fixture-exclude-setup") && + i < args.size() - 1) { + i++; + this->GetHandler("test")->SetPersistentOption( + "ExcludeFixtureSetupRegularExpression", args[i].c_str()); + this->GetHandler("memcheck") + ->SetPersistentOption("ExcludeFixtureSetupRegularExpression", + args[i].c_str()); + } + if (this->CheckArgument(arg, "-FC", "--fixture-exclude-cleanup") && + i < args.size() - 1) { + i++; + this->GetHandler("test")->SetPersistentOption( + "ExcludeFixtureCleanupRegularExpression", args[i].c_str()); + this->GetHandler("memcheck") + ->SetPersistentOption("ExcludeFixtureCleanupRegularExpression", + args[i].c_str()); + } + if (this->CheckArgument(arg, "--rerun-failed")) { this->GetHandler("test")->SetPersistentOption("RerunFailed", "true"); this->GetHandler("memcheck")->SetPersistentOption("RerunFailed", "true"); |