summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2019-03-28 10:08:16 -0300
committerThibault Saunier <tsaunier@gnome.org>2019-04-03 13:38:42 +0000
commit787939f7505407949a104539688905bc4057d2d4 (patch)
tree2054e356c1f65ccc15bc63b2d1b9e5c744607cb6
parent92f1979ec988248904fe1712c98930b6e7f330a3 (diff)
validate:launcher: Add a list of well known subpression files from gst-build subprojects
Fixes https://gitlab.freedesktop.org/gstreamer/gst-devtools/issues/38
-rw-r--r--validate/launcher/apps/gstcheck.py18
-rw-r--r--validate/launcher/baseclasses.py2
-rw-r--r--validate/launcher/utils.py25
3 files changed, 40 insertions, 5 deletions
diff --git a/validate/launcher/apps/gstcheck.py b/validate/launcher/apps/gstcheck.py
index cf660f1..0313425 100644
--- a/validate/launcher/apps/gstcheck.py
+++ b/validate/launcher/apps/gstcheck.py
@@ -30,7 +30,7 @@ import concurrent.futures as conc
from launcher import config
-from launcher.utils import printc, Colors
+from launcher.utils import printc, Colors, get_gst_build_valgrind_suppressions
from launcher.main import setup_launcher_from_args
from launcher.baseclasses import VALGRIND_TIMEOUT_FACTOR
@@ -68,6 +68,14 @@ class MesonTest(Test):
return env
+class GstCheckTest(MesonTest):
+ def get_valgrind_suppressions(self):
+ result = super().get_valgrind_suppressions()
+ result.extend(get_gst_build_valgrind_suppressions())
+
+ return result
+
+
class MesonTestsManager(TestsManager):
name = "mesontest"
arggroup = None
@@ -337,14 +345,14 @@ class GstCheckTestsManager(MesonTestsManager):
gst_tests = self.tests_info[test['cmd'][0]][1]
if not gst_tests:
child_env = self.get_child_env(name)
- self.add_test(MesonTest(name, self.options, self.reporter, test,
- child_env))
+ self.add_test(GstCheckTest(name, self.options, self.reporter, test,
+ child_env))
else:
for ltest in gst_tests:
name = self.get_test_name(test) + '.' + ltest
child_env = self.get_child_env(name, ltest)
- self.add_test(MesonTest(name, self.options, self.reporter, test,
- child_env))
+ self.add_test(GstCheckTest(name, self.options, self.reporter, test,
+ child_env))
self.save_tests_info()
self._registered = True
return self.tests
diff --git a/validate/launcher/baseclasses.py b/validate/launcher/baseclasses.py
index 2b067f7..f4cd68c 100644
--- a/validate/launcher/baseclasses.py
+++ b/validate/launcher/baseclasses.py
@@ -1099,9 +1099,11 @@ class GstValidateTest(Test):
def get_valgrind_suppressions(self):
result = super(GstValidateTest, self).get_valgrind_suppressions()
+ result.extend(utils.get_gst_build_valgrind_suppressions())
gst_sup = self.get_valgrind_suppression_file('common', 'gst.supp')
if gst_sup:
result.append(gst_sup)
+
return result
diff --git a/validate/launcher/utils.py b/validate/launcher/utils.py
index 7daf7bc..2d59714 100644
--- a/validate/launcher/utils.py
+++ b/validate/launcher/utils.py
@@ -330,6 +330,31 @@ def get_scenarios():
))
+def get_gst_build_valgrind_suppressions():
+ if hasattr(get_gst_build_valgrind_suppressions, "data"):
+ return get_gst_build_valgrind_suppressions.data
+
+ get_gst_build_valgrind_suppressions.data = []
+ if not os.path.exists(os.path.join(config.SRCDIR, "subprojects")):
+ return get_gst_build_valgrind_suppressions.data
+
+ for suppression_path in ["gstreamer/tests/check/gstreamer.supp",
+ "gst-plugins-base/tests/check/gst-plugins-base.supp",
+ "gst-plugins-good/tests/check/gst-plugins-good.supp",
+ "gst-plugins-bad/tests/check/gst-plugins-bad.supp",
+ "gst-plugins-ugly/tests/check/gst-plugins-ugly.supp",
+ "gst-libav/tests/check/gst-libav.supp",
+ "gst-devtools/validate/data/gstvalidate.supp",
+ "libnice/tests/libnice.supp",
+ "libsoup/tests/libsoup.supp",
+ "glib/glib.supp"]:
+ suppression = os.path.join(config.SRCDIR, "subprojects", suppression_path)
+ if os.path.exists(suppression):
+ get_gst_build_valgrind_suppressions.data.append(suppression)
+
+ return get_gst_build_valgrind_suppressions.data
+
+
class BackTraceGenerator(Loggable):
__instance = None
_command_line_regex = re.compile(r'Command Line: (.*)\n')