mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 03:52:25 +00:00
validate: raise an error if valgrind detected issues
Differential Revision: http://phabricator.freedesktop.org/D53
This commit is contained in:
parent
5456ddbae0
commit
f1985bc738
1 changed files with 5 additions and 0 deletions
|
@ -42,6 +42,8 @@ from utils import mkdir, Result, Colors, printc, DEFAULT_TIMEOUT, GST_SECOND, \
|
||||||
# The factor by which we increase the hard timeout when running inside
|
# The factor by which we increase the hard timeout when running inside
|
||||||
# Valgrind
|
# Valgrind
|
||||||
VALGRIND_TIMEOUT_FACTOR = 5
|
VALGRIND_TIMEOUT_FACTOR = 5
|
||||||
|
# The error reported by valgrind when detecting errors
|
||||||
|
VALGRIND_ERROR_CODE = 20
|
||||||
|
|
||||||
|
|
||||||
class Test(Loggable):
|
class Test(Loggable):
|
||||||
|
@ -289,6 +291,7 @@ class Test(Loggable):
|
||||||
('leak-resolution', 'high'),
|
('leak-resolution', 'high'),
|
||||||
('num-callers', '20'),
|
('num-callers', '20'),
|
||||||
('log-file', vglogsfile),
|
('log-file', vglogsfile),
|
||||||
|
('error-exitcode', str(VALGRIND_ERROR_CODE)),
|
||||||
]
|
]
|
||||||
|
|
||||||
supps = self.get_valgrind_suppressions()
|
supps = self.get_valgrind_suppressions()
|
||||||
|
@ -475,6 +478,8 @@ class GstValidateTest(Test):
|
||||||
self.set_result(Result.FAILED,
|
self.set_result(Result.FAILED,
|
||||||
"Application segfaulted",
|
"Application segfaulted",
|
||||||
"segfault")
|
"segfault")
|
||||||
|
elif self.process.returncode == VALGRIND_ERROR_CODE:
|
||||||
|
self.set_result(Result.FAILED, "Valgrind reported errors")
|
||||||
elif criticals or self.process.returncode != 0:
|
elif criticals or self.process.returncode != 0:
|
||||||
if criticals is None:
|
if criticals is None:
|
||||||
criticals = "No criticals"
|
criticals = "No criticals"
|
||||||
|
|
Loading…
Reference in a new issue