mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
validate:launcher: Add a list of well known subpression files from gst-build subprojects
Fixes https://gitlab.freedesktop.org/gstreamer/gst-devtools/issues/38
This commit is contained in:
parent
92f1979ec9
commit
787939f750
3 changed files with 40 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue