aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2019-04-06 21:39:12 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2019-04-06 21:39:12 +0200
commit51bc0e97e3b3f42ea9c66f13b3852c347daa26ad (patch)
tree0847077f847dfe4a6ba0206f8a76d321acd31117
parent485f97796e894f6f86f9fedcc87389c2b3e5691c (diff)
downloadorbit.lv2-51bc0e97e3b3f42ea9c66f13b3852c347daa26ad.zip
orbit.lv2-51bc0e97e3b3f42ea9c66f13b3852c347daa26ad.tar.gz
orbit.lv2-51bc0e97e3b3f42ea9c66f13b3852c347daa26ad.tar.bz2
orbit.lv2-51bc0e97e3b3f42ea9c66f13b3852c347daa26ad.tar.xz
Squashed 'timely.lv2/' changes from 46cb194..d4d4ad8
d4d4ad8 meson: add lv2_validate, lv2lint unit tests git-subtree-dir: timely.lv2 git-subtree-split: d4d4ad85091aea4d6fdb99e26062daf42f00f388
-rw-r--r--VERSION2
-rw-r--r--meson.build19
-rw-r--r--test/timely.c3
-rw-r--r--timely.h5
4 files changed, 21 insertions, 8 deletions
diff --git a/VERSION b/VERSION
index 278cbc8..6ee33ba 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.43
+0.1.45
diff --git a/meson.build b/meson.build
index 9b0dd0a..4dbff9d 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project('timely.lv2', 'c', default_options : [
'buildtype=release',
- 'warning_level=1',
+ 'warning_level=3',
'werror=false',
'b_lto=false',
'c_std=c11'])
@@ -11,6 +11,8 @@ conf_data = configuration_data()
cc = meson.get_compiler('c')
cp = find_program('cp')
+lv2_validate = find_program('lv2_validate', native : true, required : false)
+lv2lint = find_program('lv2lint', required : false)
clone = [cp, '@INPUT@', '@OUTPUT@']
m_dep = cc.find_library('m')
@@ -41,13 +43,24 @@ conf_data.set('MICRO_VERSION', version[2])
suffix = mod.full_path().strip().split('.')[-1]
conf_data.set('MODULE_SUFFIX', '.' + suffix)
-configure_file(input : join_paths('test', 'manifest.ttl.in'), output : 'manifest.ttl',
+manifest_ttl = configure_file(input : join_paths('test', 'manifest.ttl.in'), output : 'manifest.ttl',
configuration : conf_data,
install : true,
install_dir : inst_dir)
-custom_target('timely_ttl',
+dsp_ttl = custom_target('timely_ttl',
input : join_paths('test', 'timely.ttl'),
output : 'timely.ttl',
command : clone,
install : true,
install_dir : inst_dir)
+
+if lv2_validate.found()
+ test('LV2 validate', lv2_validate,
+ args : [manifest_ttl, dsp_ttl])
+endif
+
+if lv2lint.found()
+ test('LV2 lint', lv2lint,
+ args : ['-Ewarn',
+ 'http://open-music-kontrollers.ch/lv2/timely#test'])
+endif
diff --git a/test/timely.c b/test/timely.c
index ce442b0..ba2d63a 100644
--- a/test/timely.c
+++ b/test/timely.c
@@ -99,7 +99,8 @@ _timely_cb(timely_t *timely, int64_t frames, LV2_URID type, void *data)
static LV2_Handle
instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
+ const char *bundle_path __attribute__((unused)),
+ const LV2_Feature *const *features)
{
plughandle_t *handle = calloc(1, sizeof(plughandle_t));
if(!handle)
diff --git a/timely.h b/timely.h
index 7dd00ee..ed9497b 100644
--- a/timely.h
+++ b/timely.h
@@ -26,12 +26,11 @@
#include <lv2/lv2plug.in/ns/ext/atom/forge.h>
#include <lv2/lv2plug.in/ns/ext/time/time.h>
-typedef enum _timely_mask_t timely_mask_t;
typedef struct _timely_t timely_t;
typedef void (*timely_cb_t)(timely_t *timely, int64_t frames, LV2_URID type,
void *data);
-enum _timely_mask_t {
+typedef enum _timely_mask_t {
TIMELY_MASK_BAR_BEAT = (1 << 0),
TIMELY_MASK_BAR = (1 << 1),
TIMELY_MASK_BEAT_UNIT = (1 << 2),
@@ -42,7 +41,7 @@ enum _timely_mask_t {
TIMELY_MASK_SPEED = (1 << 7),
TIMELY_MASK_BAR_BEAT_WHOLE = (1 << 8),
TIMELY_MASK_BAR_WHOLE = (1 << 9)
-};
+} timely_mask_t;
struct _timely_t {
struct {