mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
launcher: try using gst.supp as valgrind suppressions file
https://bugzilla.gnome.org/show_bug.cgi?id=746465
This commit is contained in:
parent
3024b3682f
commit
cb8348c7b1
1 changed files with 23 additions and 0 deletions
|
@ -34,6 +34,7 @@ import ConfigParser
|
||||||
import loggable
|
import loggable
|
||||||
from loggable import Loggable
|
from loggable import Loggable
|
||||||
import xml.etree.cElementTree as ET
|
import xml.etree.cElementTree as ET
|
||||||
|
from gi.repository import GLib
|
||||||
|
|
||||||
from utils import mkdir, Result, Colors, printc, DEFAULT_TIMEOUT, GST_SECOND, \
|
from utils import mkdir, Result, Colors, printc, DEFAULT_TIMEOUT, GST_SECOND, \
|
||||||
Protocols
|
Protocols
|
||||||
|
@ -274,6 +275,9 @@ class Test(Loggable):
|
||||||
if self.result is not Result.TIMEOUT:
|
if self.result is not Result.TIMEOUT:
|
||||||
self.queue.put(None)
|
self.queue.put(None)
|
||||||
|
|
||||||
|
def get_valgrind_suppressions(self):
|
||||||
|
return None
|
||||||
|
|
||||||
def use_valgrind(self):
|
def use_valgrind(self):
|
||||||
vg_args = [
|
vg_args = [
|
||||||
('trace-children', 'yes'),
|
('trace-children', 'yes'),
|
||||||
|
@ -283,6 +287,10 @@ class Test(Loggable):
|
||||||
('num-callers', '20'),
|
('num-callers', '20'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
supps = self.get_valgrind_suppressions()
|
||||||
|
if supps:
|
||||||
|
vg_args.append(('suppressions', supps))
|
||||||
|
|
||||||
self.command = "valgrind %s %s" % (' '.join(map(lambda x: '--%s=%s' % (x[0], x[1]), vg_args)),
|
self.command = "valgrind %s %s" % (' '.join(map(lambda x: '--%s=%s' % (x[0], x[1]), vg_args)),
|
||||||
self.command)
|
self.command)
|
||||||
|
|
||||||
|
@ -555,6 +563,21 @@ class GstValidateTest(Test):
|
||||||
|
|
||||||
return position
|
return position
|
||||||
|
|
||||||
|
def get_valgrind_suppressions(self):
|
||||||
|
# Are we running from sources?
|
||||||
|
root_dir = os.path.abspath(os.path.dirname(os.path.join(os.path.dirname(os.path.abspath(__file__)))))
|
||||||
|
p = os.path.join(root_dir, 'common', 'gst.supp')
|
||||||
|
if os.path.exists(p):
|
||||||
|
return p
|
||||||
|
|
||||||
|
# Look in system data dirs
|
||||||
|
for datadir in GLib.get_system_data_dirs():
|
||||||
|
p = os.path.join(datadir, 'gstreamer-1.0', 'validate', 'gst.supp')
|
||||||
|
if os.path.exists(p):
|
||||||
|
return p
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
class GstValidateEncodingTestInterface(object):
|
class GstValidateEncodingTestInterface(object):
|
||||||
DURATION_TOLERANCE = GST_SECOND / 4
|
DURATION_TOLERANCE = GST_SECOND / 4
|
||||||
|
|
Loading…
Reference in a new issue