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
Sebastian Schrader
Kea
Commits
6458b98e
Commit
6458b98e
authored
Feb 25, 2011
by
Michal 'vorner' Vaner
Browse files
[trac614] Add a cleaner of the valgrind output
parent
4fa3cf5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/valgrind_test_cleaner.pl
0 → 100755
View file @
6458b98e
#!/usr/bin/perl
use
strict
;
use
warnings
;
my
(
$block
,
$blockOK
);
sub
endBlock
(_) {
return
unless
$block
;
if
(
$blockOK
)
{
print
@$block
;
}
undef
$block
;
undef
$blockOK
;
}
sub
startBlock
(_) {
$block
=
[
@
_
];
}
sub
addToBlock
(_) {
my
(
$line
)
=
@_
;
push
@$block
,
$line
;
return
unless
$line
=~
/^==\d+==\s+(at|by) 0x[0-9A-F]+: (.*) \(.+:\d+\)$/
;
$_
=
$
2
;
return
$blockOK
=
1
if
/^isc::/
;
return
$blockOK
=
1
if
/^asiolink:/
;
return
if
/^main \(/
;
return
if
/^testing::/
;
return
if
/^\(anonymous namespace\)::/
;
$blockOK
=
1
;
}
while
(
<>
)
{
if
(
/^==\d+==\s*$/
)
{
print
;
endBlock
;
}
elsif
(
/^==\d+==\s+\d+bytes.*lost in loss record/
)
{
startBlock
;
}
elsif
(
$block
)
{
addToBlock
;
}
else
{
print
;
}
}
endBlock
;
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