Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
9ff7fdc7
Commit
9ff7fdc7
authored
May 07, 2004
by
Bill Hoffman
Browse files
ENH: add the ability to block popup error dialogs in tests on windows
parent
99a1ec6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/cmCTest.cxx
View file @
9ff7fdc7
...
...
@@ -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
;
...
...
Source/cmCTest.h
View file @
9ff7fdc7
...
...
@@ -117,10 +117,7 @@ public:
/**
* Set the cmake test mode (experimental, nightly, continuous).
*/
void
SetTestModel
(
int
mode
)
{
m_TestModel
=
mode
;
}
void
SetTestModel
(
int
mode
);
std
::
string
GetTestModelString
();
static
int
GetTestModelFromString
(
const
char
*
str
);
...
...
@@ -356,7 +353,10 @@ private:
tm_VectorOfStrings
m_CustomPostTest
;
tm_VectorOfStrings
m_CustomPreMemCheck
;
tm_VectorOfStrings
m_CustomPostMemCheck
;
bool
m_InteractiveDebugMode
;
void
BlockTestErrorDiagnostics
();
int
ExecuteCommands
(
tm_VectorOfStrings
&
vec
);
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment