From: Guillaume Desmottes Date: Thu, 19 Mar 2015 16:22:26 +0000 (+0100) Subject: launcher: try using gst.supp as valgrind suppressions file X-Git-Tag: 1.19.3~491^2~1340 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb8348c7b18485761d7022c2200c82bf001b4e5f;p=platform%2Fupstream%2Fgstreamer.git launcher: try using gst.supp as valgrind suppressions file https://bugzilla.gnome.org/show_bug.cgi?id=746465 --- diff --git a/validate/launcher/baseclasses.py b/validate/launcher/baseclasses.py index 2d446e8..a7691ed 100644 --- a/validate/launcher/baseclasses.py +++ b/validate/launcher/baseclasses.py @@ -34,6 +34,7 @@ import ConfigParser import loggable from loggable import Loggable import xml.etree.cElementTree as ET +from gi.repository import GLib from utils import mkdir, Result, Colors, printc, DEFAULT_TIMEOUT, GST_SECOND, \ Protocols @@ -274,6 +275,9 @@ class Test(Loggable): if self.result is not Result.TIMEOUT: self.queue.put(None) + def get_valgrind_suppressions(self): + return None + def use_valgrind(self): vg_args = [ ('trace-children', 'yes'), @@ -283,6 +287,10 @@ class Test(Loggable): ('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) @@ -555,6 +563,21 @@ class GstValidateTest(Test): 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): DURATION_TOLERANCE = GST_SECOND / 4