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
a2ef34d3
Commit
a2ef34d3
authored
Aug 19, 2009
by
Zach
Browse files
Fixed overwriting of a previous change set
parent
b9daa192
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/CTest/cmCTestTestHandler.cxx
View file @
a2ef34d3
...
...
@@ -657,6 +657,58 @@ int cmCTestTestHandler::ProcessHandler()
return
0
;
}
//----------------------------------------------------------------------
void
cmCTestTestHandler
::
PrintLabelSummary
()
{
cmCTestTestHandler
::
ListOfTests
::
iterator
it
=
this
->
TestList
.
begin
();
cmCTestTestHandler
::
TestResultsVector
::
iterator
ri
=
this
->
TestResults
.
begin
();
std
::
map
<
cmStdString
,
double
>
labelTimes
;
std
::
set
<
cmStdString
>
labels
;
// initialize maps
for
(;
it
!=
this
->
TestList
.
end
();
++
it
)
{
cmCTestTestProperties
&
p
=
*
it
;
if
(
p
.
Labels
.
size
()
!=
0
)
{
for
(
std
::
vector
<
std
::
string
>::
iterator
l
=
p
.
Labels
.
begin
();
l
!=
p
.
Labels
.
end
();
++
l
)
{
labels
.
insert
(
*
l
);
labelTimes
[
*
l
]
=
0
;
}
}
}
it
=
this
->
TestList
.
begin
();
ri
=
this
->
TestResults
.
begin
();
// fill maps
for
(;
it
!=
this
->
TestList
.
end
();
++
it
,
++
ri
)
{
cmCTestTestProperties
&
p
=
*
it
;
cmCTestTestResult
&
result
=
*
ri
;
if
(
p
.
Labels
.
size
()
!=
0
)
{
for
(
std
::
vector
<
std
::
string
>::
iterator
l
=
p
.
Labels
.
begin
();
l
!=
p
.
Labels
.
end
();
++
l
)
{
labelTimes
[
*
l
]
+=
result
.
ExecutionTime
;
}
}
}
// now print times
for
(
std
::
set
<
cmStdString
>::
const_iterator
i
=
labels
.
begin
();
i
!=
labels
.
end
();
++
i
)
{
cmCTestLog
(
this
->
CTest
,
HANDLER_OUTPUT
,
"
\n
Time in "
<<
*
i
<<
" = "
<<
labelTimes
[
*
i
]
<<
" sec"
);
if
(
this
->
LogFile
)
{
*
this
->
LogFile
<<
"
\n
Time in "
<<
*
i
<<
" = "
<<
labelTimes
[
*
i
]
<<
" sec"
<<
std
::
endl
;
}
}
}
//----------------------------------------------------------------------
void
cmCTestTestHandler
::
ProcessOneTest
(
cmCTestTestProperties
*
it
,
std
::
vector
<
cmStdString
>
&
passed
,
...
...
Source/CTest/cmCTestTestHandler.h
View file @
a2ef34d3
...
...
@@ -186,6 +186,7 @@ private:
*/
virtual
void
GenerateDartOutput
(
std
::
ostream
&
os
);
void
PrintLabelSummary
();
/**
* Run the tests for a directory and any subdirectories
*/
...
...
Source/cmCTest.cxx
View file @
a2ef34d3
...
...
@@ -1192,7 +1192,6 @@ int cmCTest::RunTest(std::vector<const char*> argv,
{
if
(
output
)
{
//ZACH: need to grab the output here
tempOutput
.
insert
(
tempOutput
.
end
(),
data
,
data
+
length
);
}
cmCTestLog
(
this
,
HANDLER_VERBOSE_OUTPUT
,
cmCTestLogWrite
(
data
,
length
));
...
...
@@ -1205,7 +1204,6 @@ int cmCTest::RunTest(std::vector<const char*> argv,
cmsysProcess_WaitForExit
(
cp
,
0
);
if
(
output
&&
tempOutput
.
begin
()
!=
tempOutput
.
end
())
{
//We are waiting for exit before finally appending to the output
output
->
append
(
&*
tempOutput
.
begin
(),
tempOutput
.
size
());
}
cmCTestLog
(
this
,
HANDLER_VERBOSE_OUTPUT
,
"-- Process completed"
...
...
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