summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-05-07 16:53:35 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-05-07 16:53:35 (GMT)
commit9ff7fdc74fb159677ede7582c9f2cc44c386212a (patch)
treecf762021bfc349a0d1cec25e76e870a7f887c33e /Source/cmCTest.cxx
parent99a1ec6c6dc6270d685e4bcc4ed777260e4d4bdb (diff)
downloadCMake-9ff7fdc74fb159677ede7582c9f2cc44c386212a.zip
CMake-9ff7fdc74fb159677ede7582c9f2cc44c386212a.tar.gz
CMake-9ff7fdc74fb159677ede7582c9f2cc44c386212a.tar.bz2
ENH: add the ability to block popup error dialogs in tests on windows
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index f362185..2cb60ac 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -359,6 +359,7 @@ cmCTest::cmCTest()
m_ShowOnly = false;
m_RunConfigurationScript = false;
m_TestModel = cmCTest::EXPERIMENTAL;
+ m_InteractiveDebugMode = true;
m_TimeOut = 0;
m_CompatibilityMode = 0;
int cc;
@@ -370,6 +371,11 @@ cmCTest::cmCTest()
int cmCTest::Initialize()
{
+ if(!m_InteractiveDebugMode)
+ {
+ this->BlockTestErrorDiagnostics();
+ }
+
m_ToplevelPath = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::ConvertToUnixSlashes(m_ToplevelPath);
if ( !this->ReadCustomConfigurationFileTree(m_ToplevelPath.c_str()) )
@@ -512,6 +518,21 @@ void cmCTest::UpdateCTestConfiguration()
}
}
+void cmCTest::BlockTestErrorDiagnostics()
+{
+ cmSystemTools::PutEnv("DART_TEST_FROM_DART=1");
+ cmSystemTools::PutEnv("DASHBOARD_TEST_FROM_CTEST=1");
+#if defined(_WIN32)
+ SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
+#endif
+}
+
+void cmCTest::SetTestModel(int mode)
+{
+ m_InteractiveDebugMode = false;
+ m_TestModel = mode;
+}
+
bool cmCTest::SetTest(const char* ttype)
{
if ( cmSystemTools::LowerCase(ttype) == "all" )
@@ -4148,6 +4169,11 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
{
m_TomorrowTag = true;
}
+ if( arg.find("--interactive-debug-mode",0) == 0 && i < args.size() - 1 )
+ {
+ i++;
+ m_InteractiveDebugMode = cmSystemTools::IsOn(args[i].c_str());
+ }
if( arg.find("--compatibility-mode",0) == 0 )
{
m_CompatibilityMode = true;