Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
Base
Commits
f3f003e3
Commit
f3f003e3
authored
Aug 17, 2017
by
Martin Marinov
Browse files
Synchronize thread output to the test checksum report stream.
parent
d5b0d484
Changes
1
Hide whitespace changes
Inline
Side-by-side
Test/Checksum.cc
View file @
f3f003e3
...
...
@@ -6,6 +6,7 @@
#include
"Base/Debug/DebCallStack.hh"
#include
<fstream>
#include
<iostream>
#include
<mutex>
namespace
Test
{
namespace
Checksum
{
...
...
@@ -137,20 +138,24 @@ Difference Object::compare(
void
Object
::
add
(
const
Result
&
_rslt
,
const
String
&
_data
)
{
static
std
::
mutex
mtx
;
//synchronize access to the checksum report stream
std
::
lock_guard
<
std
::
mutex
>
lock
(
mtx
);
static
Base
::
OutputStreamAdaptT
<
std
::
ofstream
>
test_str
(
REPORT_FILENAME
);
static
bool
tag_out
=
false
;
#ifdef DEB_ON
static
String
prev_call_stck
;
String
call_stck
(
"/"
);
Debug
::
CallStack
::
query
().
append
(
call_stck
);
if
(
prev_call_stck
!=
call_stck
)
{
test_str
<<
call_stck
<<
Base
::
LF
;
prev_call_stck
=
call_stck
;
}
#endif//DEB_ON
if
(
!
tag_out
)
{
tag_out
=
true
;
...
...
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