mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
gstreamer-full: add unit test
This test allows to test gstreamer-full behaviour Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/203>
This commit is contained in:
parent
b25e471eaf
commit
bda7145460
6 changed files with 27 additions and 25 deletions
|
@ -1,19 +0,0 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
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;
|
||||
}
|
|
@ -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)
|
|
@ -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()),
|
||||
|
|
4
tests/meson.build
Normal file
4
tests/meson.build
Normal file
|
@ -0,0 +1,4 @@
|
|||
if get_option('tests').disabled()
|
||||
subdir_done()
|
||||
endif
|
||||
subdir('static-plugins')
|
6
tests/static-plugins/meson.build
Normal file
6
tests/static-plugins/meson.build
Normal file
|
@ -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
|
14
tests/static-plugins/test-gst-full.c
Normal file
14
tests/static-plugins/test-gst-full.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
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);
|
||||
|
||||
}
|
Loading…
Reference in a new issue