aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2019-04-04 19:17:49 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2019-04-04 19:17:49 +0200
commitc5da4df6b414b29522b0ac206fb19efa60d80f66 (patch)
treeb29cc3ac82b5f5a7bda2596f577ea0835b2d8020 /meson.build
parent9d80261ce9cc8a3d42ca573d68af15631d867eed (diff)
downloadprops.lv2-c5da4df6b414b29522b0ac206fb19efa60d80f66.tar.xz
test: add prototype unit test template.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build26
1 files changed, 24 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 176a8bb..28516ac 100644
--- a/meson.build
+++ b/meson.build
@@ -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,11 +43,12 @@ 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('props_ttl',
+dsp_ttl = custom_target('props_ttl',
input : join_paths('test', 'props.ttl'),
output : 'props.ttl',
command : clone,
@@ -57,3 +60,22 @@ custom_target('chunk_bin',
command : clone,
install : true,
install_dir : inst_dir)
+
+props_test = executable('props_test',
+ join_paths('test', 'props_test.c'),
+ c_args : c_args,
+ install : false)
+
+test('Test', props_test,
+ timeout : 240)
+
+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/props#test'])
+endif