mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
auto-t: don't print valgrind log if there was no error
If valgrind didn't report any issues, don't dump the logs. This makes the test run a lot easier to look at without having to scroll through pages of valgrind logs that provide no value.
This commit is contained in:
parent
64d68b4f08
commit
fbf8ed4140
@ -899,11 +899,17 @@ def post_test(ctx, to_copy):
|
|||||||
|
|
||||||
if ctx.args.valgrind:
|
if ctx.args.valgrind:
|
||||||
for f in os.listdir('/tmp'):
|
for f in os.listdir('/tmp'):
|
||||||
if f.startswith("valgrind.log."):
|
if not f.startswith("valgrind.log."):
|
||||||
dbg(f)
|
continue
|
||||||
|
|
||||||
with open('/tmp/' + f, 'r') as v:
|
with open('/tmp/' + f, 'r') as v:
|
||||||
dbg(v.read())
|
result = v.read()
|
||||||
|
|
||||||
|
# Don't print out the result if there were no issues
|
||||||
|
if "0 errors from 0 contexts" not in result:
|
||||||
|
dbg(result)
|
||||||
dbg("\n")
|
dbg("\n")
|
||||||
|
|
||||||
os.remove('/tmp/' + f)
|
os.remove('/tmp/' + f)
|
||||||
|
|
||||||
# Special case for when logging is enabled
|
# Special case for when logging is enabled
|
||||||
|
Loading…
Reference in New Issue
Block a user