[rygel/wip/meson: 51/52] meson: Add tests



commit b78ba517a9df74d5b78d1129a3310feb26582e11
Author: Jens Georg <mail jensge org>
Date:   Thu Oct 18 10:02:56 2018 +0200

    meson: Add tests

 meson.build       |  5 +++++
 meson_options.txt |  1 +
 tests/meson.build | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)
---
diff --git a/meson.build b/meson.build
index 23bd89ea..d875b738 100644
--- a/meson.build
+++ b/meson.build
@@ -183,3 +183,8 @@ subdir('doc')
 if get_option('examples')
     subdir('examples')
 endif
+
+
+if get_option('tests')
+    subdir('tests')
+endif
\ No newline at end of file
diff --git a/meson_options.txt b/meson_options.txt
index 250c24fe..dace80f2 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,3 +4,4 @@ option('systemd-user-units-dir', type : 'string', value : 'auto', description :
 option('plugins', type : 'array', choices : ['external', 'gst-launch', 'lms', 'media-export', 'mpris', 
'playbin', 'ruih', 'tracker'])
 option('engines', type : 'array', choices : ['simple', 'gstreamer'])
 option('examples', type : 'boolean', value : 'true')
+option('tests', type : 'boolean', value : 'true')
\ No newline at end of file
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 00000000..a1e3a71a
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,67 @@
+test_deps = common_deps
+
+searchable_container_test = executable(
+    'rygel-searchable-container-test',
+    files('searchable-container/rygel-searchable-container.vala',
+          'searchable-container/test.vala'),
+    dependencies : [test_deps, gupnp_av, gio]
+)
+
+object_creator_test = executable(
+    'rygel-object-creator-test',
+    files('object-creator/test.vala',
+          'object-creator/rygel-object-creator.vala',
+          'object-creator/rygel-dlna-profile.vala',
+          'object-creator/rygel-serializer.vala',
+          'object-creator/rygel-m3u-playlist.vala',
+          'object-creator/rygel-state-machine.vala',
+          'object-creator/rygel-search-expression.vala',
+          'object-creator/rygel-relational-expression.vala',
+          'object-creator/rygel-logical-expression.vala',
+          'object-creator/rygel-search-criteria-parser.vala'),
+    dependencies : [test_deps, gio, gupnp_av, soup, libxml]
+)
+
+user_config_test = executable(
+    'rygel-user-config-test',
+    files('rygel-configuration.vala',
+          'rygel-user-config.vala',
+          'rygel-user-config-test.vala'),
+    vala_args : ['--pkg', 'rygel-build-config', '--vapidir', join_paths(meson.source_root(), 
'src/librygel-core')],
+    include_directories : config_include,
+    dependencies : [test_deps, gio]
+)
+
+regression_test = executable(
+    'rygel-regression-test',
+    files('rygel-regression.vala'),
+    dependencies : [test_deps, gio, rygel_core, rygel_server]
+)
+
+database_test = executable(
+    'rygel-database-test.vala',
+    files('rygel-database-test.vala'),
+    dependencies : [rygel_db]
+)
+
+environment_test = executable(
+    'rygel-environment-test',
+    files('rygel-environment-test.vala'),
+    dependencies : [gstreamer]
+)
+
+playbin_renderer_test = executable(
+    'rygel-playbin-renderer-test',
+    files('rygel-playbin-renderer-test.vala'),
+    dependencies : [gstreamer, rygel_core, rygel_renderer, rygel_renderer_gst]
+)
+
+test('rygel-searchable-container-test', searchable_container_test)
+test('rygel-object-creator-test', object_creator_test)
+test('rygel-regression-test', regression_test)
+test('rygel-database-test', database_test)
+test('rygel-environment-test', environment_test)
+test('rygel-playbin-renderer-test', playbin_renderer_test)
+
+# Up the timeout, the test itself is waiting 10s per round for changes, doing 4 rounds
+test('rygel-user-config-test', user_config_test, timeout : 50)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]