mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
fixing tests
Original commit message from CVS: fixing tests
This commit is contained in:
parent
5173ab2d2c
commit
25b21e82f5
6 changed files with 54 additions and 8 deletions
|
@ -4,9 +4,15 @@ SUBDIRS = caps cleanup plugin elements clock refcounting ## dynparams
|
|||
GST_PLUGIN_PATH = $(shell cd $(top_builddir) && pwd)
|
||||
TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`/test-registry.xml
|
||||
|
||||
if BUILD_FAILING_TESTS
|
||||
testprogs = test_gst_init
|
||||
inspectcheck = gst-inspect-check
|
||||
else
|
||||
testprogs =
|
||||
inspectcheck =
|
||||
endif
|
||||
|
||||
TESTS = $(top_builddir)/tools/gst-register $(testprogs) gst-inspect-check
|
||||
TESTS = $(top_builddir)/tools/gst-register $(testprogs) $(inspectcheck)
|
||||
|
||||
check_PROGRAMS = $(testprogs)
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ int
|
|||
main (int argc, char *argv[])
|
||||
{
|
||||
GstPlugin *plugin;
|
||||
GError *error = NULL;
|
||||
gboolean loaded;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
|
@ -12,7 +13,12 @@ main (int argc, char *argv[])
|
|||
plugin = gst_plugin_new (".libs/libtestplugin.so");
|
||||
g_assert (plugin != NULL);
|
||||
|
||||
loaded = gst_plugin_load_plugin (plugin);
|
||||
loaded = gst_plugin_load_plugin (plugin, &error);
|
||||
if (error)
|
||||
{
|
||||
g_print ("ERROR loading plug-in: %s\n", error->message);
|
||||
g_free (error);
|
||||
}
|
||||
g_assert (loaded == TRUE);
|
||||
|
||||
g_print ("testplugin: %d, %s\n", loaded, plugin->name);
|
||||
|
|
|
@ -7,6 +7,7 @@ main (int argc, char *argv[])
|
|||
GstPlugin *plugin;
|
||||
gboolean loaded = FALSE;
|
||||
gint numplugins;
|
||||
GError *error = NULL;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
|
||||
|
@ -22,7 +23,12 @@ main (int argc, char *argv[])
|
|||
|
||||
g_print ("testplugin: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
|
||||
|
||||
loaded = gst_plugin_load_plugin (plugin);
|
||||
loaded = gst_plugin_load_plugin (plugin, &error);
|
||||
if (error)
|
||||
{
|
||||
g_print ("ERROR loading plug-in: %s\n", error->message);
|
||||
g_free (error);
|
||||
}
|
||||
g_assert (loaded == TRUE);
|
||||
|
||||
numplugins = g_list_length (gst_registry_pool_plugin_list ());
|
||||
|
@ -36,7 +42,12 @@ main (int argc, char *argv[])
|
|||
|
||||
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
|
||||
|
||||
loaded = gst_plugin_load_plugin (plugin);
|
||||
loaded = gst_plugin_load_plugin (plugin, &error);
|
||||
if (error)
|
||||
{
|
||||
g_print ("ERROR loading plug-in: %s\n", error->message);
|
||||
g_free (error);
|
||||
}
|
||||
g_assert (loaded == TRUE);
|
||||
|
||||
numplugins = g_list_length (gst_registry_pool_plugin_list ());
|
||||
|
|
|
@ -4,9 +4,15 @@ SUBDIRS = caps cleanup plugin elements clock refcounting ## dynparams
|
|||
GST_PLUGIN_PATH = $(shell cd $(top_builddir) && pwd)
|
||||
TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`/test-registry.xml
|
||||
|
||||
if BUILD_FAILING_TESTS
|
||||
testprogs = test_gst_init
|
||||
inspectcheck = gst-inspect-check
|
||||
else
|
||||
testprogs =
|
||||
inspectcheck =
|
||||
endif
|
||||
|
||||
TESTS = $(top_builddir)/tools/gst-register $(testprogs) gst-inspect-check
|
||||
TESTS = $(top_builddir)/tools/gst-register $(testprogs) $(inspectcheck)
|
||||
|
||||
check_PROGRAMS = $(testprogs)
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ int
|
|||
main (int argc, char *argv[])
|
||||
{
|
||||
GstPlugin *plugin;
|
||||
GError *error = NULL;
|
||||
gboolean loaded;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
|
@ -12,7 +13,12 @@ main (int argc, char *argv[])
|
|||
plugin = gst_plugin_new (".libs/libtestplugin.so");
|
||||
g_assert (plugin != NULL);
|
||||
|
||||
loaded = gst_plugin_load_plugin (plugin);
|
||||
loaded = gst_plugin_load_plugin (plugin, &error);
|
||||
if (error)
|
||||
{
|
||||
g_print ("ERROR loading plug-in: %s\n", error->message);
|
||||
g_free (error);
|
||||
}
|
||||
g_assert (loaded == TRUE);
|
||||
|
||||
g_print ("testplugin: %d, %s\n", loaded, plugin->name);
|
||||
|
|
|
@ -7,6 +7,7 @@ main (int argc, char *argv[])
|
|||
GstPlugin *plugin;
|
||||
gboolean loaded = FALSE;
|
||||
gint numplugins;
|
||||
GError *error = NULL;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
|
||||
|
@ -22,7 +23,12 @@ main (int argc, char *argv[])
|
|||
|
||||
g_print ("testplugin: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
|
||||
|
||||
loaded = gst_plugin_load_plugin (plugin);
|
||||
loaded = gst_plugin_load_plugin (plugin, &error);
|
||||
if (error)
|
||||
{
|
||||
g_print ("ERROR loading plug-in: %s\n", error->message);
|
||||
g_free (error);
|
||||
}
|
||||
g_assert (loaded == TRUE);
|
||||
|
||||
numplugins = g_list_length (gst_registry_pool_plugin_list ());
|
||||
|
@ -36,7 +42,12 @@ main (int argc, char *argv[])
|
|||
|
||||
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
|
||||
|
||||
loaded = gst_plugin_load_plugin (plugin);
|
||||
loaded = gst_plugin_load_plugin (plugin, &error);
|
||||
if (error)
|
||||
{
|
||||
g_print ("ERROR loading plug-in: %s\n", error->message);
|
||||
g_free (error);
|
||||
}
|
||||
g_assert (loaded == TRUE);
|
||||
|
||||
numplugins = g_list_length (gst_registry_pool_plugin_list ());
|
||||
|
|
Loading…
Reference in a new issue