diff --git a/examples/static-plugins/main.c b/examples/static-plugins/main.c deleted file mode 100644 index 1917726f25..0000000000 --- a/examples/static-plugins/main.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -int -main (int argc, char *argv[]) -{ - GstElement *e; - - gst_init (&argc, &argv); - - e = gst_element_factory_make ("identity", NULL); - g_assert_nonnull (e); - g_object_unref (e); - - e = gst_element_factory_make ("alpha", NULL); - g_assert_nonnull (e); - g_object_unref (e); - - return 0; -} diff --git a/examples/static-plugins/meson.build b/examples/static-plugins/meson.build deleted file mode 100644 index 0273086be9..0000000000 --- a/examples/static-plugins/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('myapp', 'c') - -dep = dependency('gstreamer-full-1.0') -app = executable('myapp', 'main.c', dependencies : dep) - -test('test-gstreamer-full', app) diff --git a/meson.build b/meson.build index 39a336a77c..3a187b111e 100644 --- a/meson.build +++ b/meson.build @@ -337,6 +337,9 @@ foreach custom_subproj: get_option('custom_subprojects').split(',') endforeach message('Building subprojects: ' + ', '.join(subprojects_names)) + +subdir('tests') + setenv = find_program('gst-env.py') devenv_cmd = [setenv, '--builddir=@0@'.format(meson.build_root()), diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 0000000000..6884250f76 --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,4 @@ +if get_option('tests').disabled() + subdir_done() +endif +subdir('static-plugins') diff --git a/tests/static-plugins/meson.build b/tests/static-plugins/meson.build new file mode 100644 index 0000000000..37b133672f --- /dev/null +++ b/tests/static-plugins/meson.build @@ -0,0 +1,6 @@ + +dep = dependency('gstreamer-full-1.0', required: get_option('default_library') == 'static') +if dep.found() + test_elements = executable('test-gst-full', 'test-gst-full.c', dependencies : gst_full_dep) + test('test-gst-full', test_elements) +endif diff --git a/tests/static-plugins/test-gst-full.c b/tests/static-plugins/test-gst-full.c new file mode 100644 index 0000000000..6ba1a2ab40 --- /dev/null +++ b/tests/static-plugins/test-gst-full.c @@ -0,0 +1,14 @@ +#include + +int +main (int argc, char *argv[]) +{ + GstElement *e; + + gst_init (&argc, &argv); + + e = gst_element_factory_make ("pipeline", NULL); + g_assert_nonnull (e); + g_object_unref (e); + +}