summaryrefslogtreecommitdiffstats
path: root/test/failed_lib_descriptor.lv2
diff options
context:
space:
mode:
Diffstat (limited to 'test/failed_lib_descriptor.lv2')
-rw-r--r--test/failed_lib_descriptor.lv2/failed_lib_descriptor.c18
-rw-r--r--test/failed_lib_descriptor.lv2/meson.build36
-rw-r--r--test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c15
3 files changed, 42 insertions, 27 deletions
diff --git a/test/failed_lib_descriptor.lv2/failed_lib_descriptor.c b/test/failed_lib_descriptor.lv2/failed_lib_descriptor.c
index c7c08cf..2d0baee 100644
--- a/test/failed_lib_descriptor.lv2/failed_lib_descriptor.c
+++ b/test/failed_lib_descriptor.lv2/failed_lib_descriptor.c
@@ -1,19 +1,5 @@
-/*
- Lilv Test Plugin - Failed lib descriptor
- Copyright 2011-2019 David Robillard <d@drobilla.net>
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
+// Copyright 2011-2019 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: ISC
#include "lv2/core/lv2.h"
diff --git a/test/failed_lib_descriptor.lv2/meson.build b/test/failed_lib_descriptor.lv2/meson.build
new file mode 100644
index 0000000..61de196
--- /dev/null
+++ b/test/failed_lib_descriptor.lv2/meson.build
@@ -0,0 +1,36 @@
+# Copyright 2021-2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: 0BSD OR ISC
+
+module = shared_module(
+ 'failed_lib_descriptor',
+ files('failed_lib_descriptor.c'),
+ c_args: c_suppressions,
+ 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: files(f + '.in'),
+ output: f,
+ configuration: config,
+ )
+endforeach
+
+test(
+ 'failed_lib_descriptor',
+ executable(
+ 'test_failed_lib_descriptor',
+ files('test_failed_lib_descriptor.c'),
+ c_args: c_suppressions + test_args,
+ dependencies: [lv2_dep, lilv_static_dep],
+ ),
+ args: [meson.current_build_dir() / ''],
+ suite: 'plugin',
+)
+
diff --git a/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c b/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c
index 71a3b96..9a9641b 100644
--- a/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c
+++ b/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c
@@ -1,15 +1,12 @@
-#undef NDEBUG
+// Copyright 2015-2020 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: ISC
-#include "../src/filesystem.h"
+#undef NDEBUG
#include "lilv/lilv.h"
-#include "serd/serd.h"
#include <assert.h>
-#include <stdbool.h>
-#include <stdint.h>
#include <stdio.h>
-#include <stdlib.h>
#define PLUGIN_URI "http://example.org/failed-lib-descriptor"
@@ -25,12 +22,8 @@ main(int argc, char** argv)
LilvWorld* world = lilv_world_new();
// Load test plugin bundle
- uint8_t* abs_bundle = (uint8_t*)lilv_path_absolute(bundle_path);
- SerdNode bundle = serd_node_new_file_uri(abs_bundle, 0, 0, true);
- LilvNode* bundle_uri = lilv_new_uri(world, (const char*)bundle.buf);
+ LilvNode* bundle_uri = lilv_new_file_uri(world, NULL, bundle_path);
lilv_world_load_bundle(world, bundle_uri);
- free(abs_bundle);
- serd_node_free(&bundle);
lilv_node_free(bundle_uri);
LilvNode* plugin_uri = lilv_new_uri(world, PLUGIN_URI);