Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Matthew P. Russell
unit_test
Commits
a31d99c8
Commit
a31d99c8
authored
Jan 05, 2021
by
Matthew P. Russell
Browse files
Update unit_test
parent
4d82878f
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/unit_test
View file @
a31d99c8
...
...
@@ -197,10 +197,10 @@ for test in test_names:
if
valgrind_passphrase
not
in
VALGRIND_RESULT
.
stderr
:
# only capture the part after "LEAK SUMMARY"
VALGRIND_
RESULT
=
VALGRIND_RESULT
.
stderr
.
split
(
"LEAK SUMMARY"
)[
1
]
VALGRIND_
INFO
=
VALGRIND_RESULT
.
stderr
.
split
(
"LEAK SUMMARY"
)[
1
]
# check for leaks
for
line
in
VALGRIND_
RESULT
.
split
(
'
\n
'
):
for
line
in
VALGRIND_
INFO
.
split
(
'
\n
'
):
if
"lost"
in
line
and
"0 bytes in 0 blocks"
not
in
line
:
valgrind_passed
=
False
break
...
...
@@ -210,7 +210,7 @@ for test in test_names:
score
+=
valgrind_test_max
else
:
inform
(
"valgrind failed"
,
color
=
FAILURE
,
linebreak
=
True
)
inform
(
VALGRIND_RESULT
,
color
=
FAILURE
,
extraline
=
True
)
inform
(
VALGRIND_RESULT
.
stderr
,
color
=
FAILURE
,
extraline
=
True
)
# if here, then the regular test failed
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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