summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/bad_syntax.lv2/meson.build24
-rw-r--r--test/failed_instantiation.lv2/meson.build24
-rw-r--r--test/failed_lib_descriptor.lv2/meson.build24
-rw-r--r--test/lib_descriptor.lv2/meson.build24
-rw-r--r--test/lilv_test_utils.c2
-rw-r--r--test/lv2/core.lv2/lv2core.ttl (renamed from test/core.lv2/lv2core.ttl)0
-rw-r--r--test/lv2/core.lv2/manifest.ttl (renamed from test/core.lv2/manifest.ttl)0
-rw-r--r--test/lv2/core.lv2/meson.build8
-rw-r--r--test/meson.build61
-rw-r--r--test/missing_descriptor.lv2/meson.build24
-rw-r--r--test/missing_name.lv2/meson.build24
-rw-r--r--test/missing_plugin.lv2/meson.build24
-rw-r--r--test/missing_port.lv2/meson.build24
-rw-r--r--test/missing_port_name.lv2/meson.build24
-rw-r--r--test/new_version.lv2/meson.build16
-rw-r--r--test/old_version.lv2/meson.build16
-rw-r--r--test/test_plugin.lv2/manifest.ttl.in (renamed from test/test.lv2/manifest.ttl.in)4
-rw-r--r--test/test_plugin.lv2/meson.build16
-rw-r--r--test/test_plugin.lv2/test_plugin.c (renamed from test/test.lv2/test.c)0
-rw-r--r--test/test_plugin.lv2/test_plugin.ttl.in (renamed from test/test.lv2/test.ttl.in)0
20 files changed, 336 insertions, 3 deletions
diff --git a/test/bad_syntax.lv2/meson.build b/test/bad_syntax.lv2/meson.build
new file mode 100644
index 0000000..07e96d7
--- /dev/null
+++ b/test/bad_syntax.lv2/meson.build
@@ -0,0 +1,24 @@
+module = shared_module('bad_syntax',
+ 'bad_syntax.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'bad_syntax.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
+test('bad_syntax',
+ executable('test_bad_syntax',
+ 'test_bad_syntax.c',
+ c_args: prog_args,
+ dependencies: [lv2_dep, lilv_static_dep]),
+ args: [meson.current_build_dir() / ''],
+ suite: 'plugin')
+
diff --git a/test/failed_instantiation.lv2/meson.build b/test/failed_instantiation.lv2/meson.build
new file mode 100644
index 0000000..2221b4f
--- /dev/null
+++ b/test/failed_instantiation.lv2/meson.build
@@ -0,0 +1,24 @@
+module = shared_module('failed_instantiation',
+ 'failed_instantiation.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'failed_instantiation.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
+test('failed_instantiation',
+ executable('test_failed_instantiation',
+ 'test_failed_instantiation.c',
+ c_args: prog_args,
+ dependencies: [lv2_dep, lilv_static_dep]),
+ args: [meson.current_build_dir() / ''],
+ suite: 'plugin')
+
diff --git a/test/failed_lib_descriptor.lv2/meson.build b/test/failed_lib_descriptor.lv2/meson.build
new file mode 100644
index 0000000..b4c37f4
--- /dev/null
+++ b/test/failed_lib_descriptor.lv2/meson.build
@@ -0,0 +1,24 @@
+module = shared_module('failed_lib_descriptor',
+ 'failed_lib_descriptor.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'failed_lib_descriptor.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
+test('failed_lib_descriptor',
+ executable('test_failed_lib_descriptor',
+ 'test_failed_lib_descriptor.c',
+ c_args: prog_args,
+ dependencies: [lv2_dep, lilv_static_dep]),
+ args: [meson.current_build_dir() / ''],
+ suite: 'plugin')
+
diff --git a/test/lib_descriptor.lv2/meson.build b/test/lib_descriptor.lv2/meson.build
new file mode 100644
index 0000000..9006dfc
--- /dev/null
+++ b/test/lib_descriptor.lv2/meson.build
@@ -0,0 +1,24 @@
+module = shared_module('lib_descriptor',
+ 'lib_descriptor.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'lib_descriptor.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
+test('lib_descriptor',
+ executable('test_lib_descriptor',
+ 'test_lib_descriptor.c',
+ c_args: prog_args,
+ dependencies: [lv2_dep, lilv_static_dep]),
+ args: [meson.current_build_dir() / ''],
+ suite: 'plugin')
+
diff --git a/test/lilv_test_utils.c b/test/lilv_test_utils.c
index f658f1b..bc6eb3d 100644
--- a/test/lilv_test_utils.c
+++ b/test/lilv_test_utils.c
@@ -47,7 +47,7 @@ lilv_test_env_new(void)
// Set custom LV2_PATH in build directory to only use test data
char* test_path = lilv_path_canonical(LILV_TEST_DIR);
- char* lv2_path = lilv_strjoin(test_path, "/test_lv2_path", NULL);
+ char* lv2_path = lilv_strjoin(test_path, "/lv2", NULL);
LilvNode* path = lilv_new_string(world, lv2_path);
lilv_world_set_option(world, LILV_OPTION_LV2_PATH, path);
free(lv2_path);
diff --git a/test/core.lv2/lv2core.ttl b/test/lv2/core.lv2/lv2core.ttl
index 5659487..5659487 100644
--- a/test/core.lv2/lv2core.ttl
+++ b/test/lv2/core.lv2/lv2core.ttl
diff --git a/test/core.lv2/manifest.ttl b/test/lv2/core.lv2/manifest.ttl
index a77ad71..a77ad71 100644
--- a/test/core.lv2/manifest.ttl
+++ b/test/lv2/core.lv2/manifest.ttl
diff --git a/test/lv2/core.lv2/meson.build b/test/lv2/core.lv2/meson.build
new file mode 100644
index 0000000..f6e08e3
--- /dev/null
+++ b/test/lv2/core.lv2/meson.build
@@ -0,0 +1,8 @@
+ttl_files = [
+ 'lv2core.ttl',
+ 'manifest.ttl',
+]
+
+foreach f : ttl_files
+ configure_file(copy: true, input: f, output: f)
+endforeach
diff --git a/test/meson.build b/test/meson.build
new file mode 100644
index 0000000..597b765
--- /dev/null
+++ b/test/meson.build
@@ -0,0 +1,61 @@
+autoship = find_program('autoship', required: false)
+
+subdir('lv2/core.lv2')
+
+subdir('bad_syntax.lv2')
+subdir('failed_instantiation.lv2')
+subdir('failed_lib_descriptor.lv2')
+subdir('lib_descriptor.lv2')
+subdir('missing_descriptor.lv2')
+subdir('missing_name.lv2')
+subdir('missing_plugin.lv2')
+subdir('missing_port.lv2')
+subdir('missing_port_name.lv2')
+subdir('new_version.lv2')
+subdir('old_version.lv2')
+subdir('test_plugin.lv2')
+
+unit_tests = [
+ 'bad_port_index',
+ 'bad_port_symbol',
+ 'classes',
+ 'discovery',
+ 'filesystem',
+ 'get_symbol',
+ 'no_author',
+ 'no_verify',
+ 'plugin',
+ 'port',
+ 'preset',
+ 'project',
+ 'project_no_author',
+ 'prototype',
+ 'reload_bundle',
+ 'replace_version',
+ 'state',
+ 'string',
+ 'ui',
+ 'util',
+ 'value',
+ 'verify',
+ 'world',
+]
+
+define_args = [
+ '-DLILV_TEST_BUNDLE="@0@/"'.format(meson.current_build_dir() / 'test_plugin.lv2'),
+ '-DLILV_TEST_DIR="@0@/"'.format(meson.current_build_dir()),
+]
+
+foreach unit : unit_tests
+ test(unit,
+ executable('test_@0@'.format(unit),
+ ['lilv_test_utils.c', 'test_@0@.c'.format(unit)],
+ c_args: prog_args + define_args,
+ include_directories: include_directories(['../src']),
+ dependencies: [lv2_dep, lilv_static_dep]),
+ suite: 'unit')
+endforeach
+
+if autoship.found()
+ test('autoship', autoship, args: ['test', lilv_src_root], suite: 'data')
+endif
diff --git a/test/missing_descriptor.lv2/meson.build b/test/missing_descriptor.lv2/meson.build
new file mode 100644
index 0000000..2112a99
--- /dev/null
+++ b/test/missing_descriptor.lv2/meson.build
@@ -0,0 +1,24 @@
+module = shared_module('missing_descriptor',
+ 'missing_descriptor.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'missing_descriptor.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
+test('missing_descriptor',
+ executable('test_missing_descriptor',
+ 'test_missing_descriptor.c',
+ c_args: prog_args,
+ dependencies: [lv2_dep, lilv_static_dep]),
+ args: [meson.current_build_dir() / ''],
+ suite: 'plugin')
+
diff --git a/test/missing_name.lv2/meson.build b/test/missing_name.lv2/meson.build
new file mode 100644
index 0000000..02979be
--- /dev/null
+++ b/test/missing_name.lv2/meson.build
@@ -0,0 +1,24 @@
+module = shared_module('missing_name',
+ 'missing_name.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'missing_name.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
+test('missing_name',
+ executable('test_missing_name',
+ 'test_missing_name.c',
+ c_args: prog_args,
+ dependencies: [lv2_dep, lilv_static_dep]),
+ args: [meson.current_build_dir() / ''],
+ suite: 'plugin')
+
diff --git a/test/missing_plugin.lv2/meson.build b/test/missing_plugin.lv2/meson.build
new file mode 100644
index 0000000..7197a33
--- /dev/null
+++ b/test/missing_plugin.lv2/meson.build
@@ -0,0 +1,24 @@
+module = shared_module('missing_plugin',
+ 'missing_plugin.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'missing_plugin.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
+test('missing_plugin',
+ executable('test_missing_plugin',
+ 'test_missing_plugin.c',
+ c_args: prog_args,
+ dependencies: [lv2_dep, lilv_static_dep]),
+ args: [meson.current_build_dir() / ''],
+ suite: 'plugin')
+
diff --git a/test/missing_port.lv2/meson.build b/test/missing_port.lv2/meson.build
new file mode 100644
index 0000000..c3f5461
--- /dev/null
+++ b/test/missing_port.lv2/meson.build
@@ -0,0 +1,24 @@
+module = shared_module('missing_port',
+ 'missing_port.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'missing_port.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
+test('missing_port',
+ executable('test_missing_port',
+ 'test_missing_port.c',
+ c_args: prog_args,
+ dependencies: [lv2_dep, lilv_static_dep]),
+ args: [meson.current_build_dir() / ''],
+ suite: 'plugin')
+
diff --git a/test/missing_port_name.lv2/meson.build b/test/missing_port_name.lv2/meson.build
new file mode 100644
index 0000000..806370b
--- /dev/null
+++ b/test/missing_port_name.lv2/meson.build
@@ -0,0 +1,24 @@
+module = shared_module('missing_port_name',
+ 'missing_port_name.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'missing_port_name.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
+test('missing_port_name',
+ executable('test_missing_port_name',
+ 'test_missing_port_name.c',
+ c_args: prog_args,
+ dependencies: [lv2_dep, lilv_static_dep]),
+ args: [meson.current_build_dir() / ''],
+ suite: 'plugin')
+
diff --git a/test/new_version.lv2/meson.build b/test/new_version.lv2/meson.build
new file mode 100644
index 0000000..dce1ba2
--- /dev/null
+++ b/test/new_version.lv2/meson.build
@@ -0,0 +1,16 @@
+module = shared_module('new_version',
+ 'new_version.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'new_version.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
diff --git a/test/old_version.lv2/meson.build b/test/old_version.lv2/meson.build
new file mode 100644
index 0000000..85b1dad
--- /dev/null
+++ b/test/old_version.lv2/meson.build
@@ -0,0 +1,16 @@
+module = shared_module('old_version',
+ 'old_version.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'old_version.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
diff --git a/test/test.lv2/manifest.ttl.in b/test/test_plugin.lv2/manifest.ttl.in
index bc3952c..48b009b 100644
--- a/test/test.lv2/manifest.ttl.in
+++ b/test/test_plugin.lv2/manifest.ttl.in
@@ -3,5 +3,5 @@
<http://example.org/lilv-test-plugin>
a lv2:Plugin ;
- lv2:binary <test@SHLIB_EXT@> ;
- rdfs:seeAlso <test.ttl> .
+ lv2:binary <test_plugin@SHLIB_EXT@> ;
+ rdfs:seeAlso <test_plugin.ttl> .
diff --git a/test/test_plugin.lv2/meson.build b/test/test_plugin.lv2/meson.build
new file mode 100644
index 0000000..eb12c4f
--- /dev/null
+++ b/test/test_plugin.lv2/meson.build
@@ -0,0 +1,16 @@
+module = shared_module('test_plugin',
+ 'test_plugin.c',
+ dependencies: lv2_dep,
+ gnu_symbol_visibility: 'hidden',
+ name_prefix: '')
+
+extension = '.' + module.full_path().split('.')[-1]
+config = configuration_data({'SHLIB_EXT': extension})
+ttl_files = ['manifest.ttl', 'test_plugin.ttl']
+
+foreach f : ttl_files
+ configure_file(input: f + '.in',
+ output: f,
+ configuration: config)
+endforeach
+
diff --git a/test/test.lv2/test.c b/test/test_plugin.lv2/test_plugin.c
index 2be34b4..2be34b4 100644
--- a/test/test.lv2/test.c
+++ b/test/test_plugin.lv2/test_plugin.c
diff --git a/test/test.lv2/test.ttl.in b/test/test_plugin.lv2/test_plugin.ttl.in
index 1c16b4c..1c16b4c 100644
--- a/test/test.lv2/test.ttl.in
+++ b/test/test_plugin.lv2/test_plugin.ttl.in