From 817ef82bb0462232fadeeeaec29063589cb252c3 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 13 May 2015 15:27:08 +0200 Subject: [PATCH] validate: overrides: Allow using regex for named overrides Summary: And minor fixes Depends on D172 Reviewers: Mathieu_Du, gdesmott Differential Revision: http://phabricator.freedesktop.org/D173 --- validate/gst/validate/gst-validate-override-registry.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/validate/gst/validate/gst-validate-override-registry.c b/validate/gst/validate/gst-validate-override-registry.c index e9b5a37..b86e49e 100644 --- a/validate/gst/validate/gst-validate-override-registry.c +++ b/validate/gst/validate/gst-validate-override-registry.c @@ -29,8 +29,11 @@ #include +#include "gst-validate-report.h" #include "gst-validate-utils.h" +#include "gst-validate-monitor.h" #include "gst-validate-internal.h" +#include "gst-validate-override.h" #include "gst-validate-override-registry.h" typedef struct @@ -135,7 +138,9 @@ static void name = gst_validate_monitor_get_element_name (monitor); for (iter = registry->name_overrides.head; iter; iter = g_list_next (iter)) { entry = iter->data; - if (g_strcmp0 (name, entry->name) == 0) { + if (g_regex_match_simple (entry->name, name, 0, 0)) { + GST_INFO_OBJECT (registry, "Adding override %s to %s", entry->name, name); + gst_validate_monitor_attach_override (monitor, entry->override); } } @@ -344,7 +349,7 @@ gst_validate_override_registry_preload (void) return 0; } - modlist = g_strsplit (sos, ",", 0); + modlist = g_strsplit (sos, G_SEARCHPATH_SEPARATOR_S, 0); for (modname = modlist; *modname; ++modname) { GST_INFO ("Loading overrides from %s", *modname); module = g_module_open (*modname, G_MODULE_BIND_LAZY); -- 2.7.4