Browse Source

fix lv2_validate/lv2lint tests, add carla-single test

faust
Alexandros Theodotou 2 years ago
parent
commit
886dc59c3d
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 15
      meson.build
  2. 36
      plugins/meson.build
  3. 32
      scripts/carla_single_wrap.sh
  4. 24
      scripts/lv2_validate_wrap.sh
  5. 24
      scripts/lv2lint_wrap.sh

15
meson.build

@ -31,6 +31,19 @@ fs = import('fs') @@ -31,6 +31,19 @@ fs = import('fs')
guile = find_program (['guile2.2', 'guile'])
sh = find_program ('sh')
bash = find_program ('bash')
lv2lint = find_program ('lv2lint', required: false)
lv2_validate = find_program (
'lv2_validate', required: false)
sord_validate = find_program (
'sord_validate', required: false)
carla_single = find_program (
'carla-single', required: false)
carla_single_wrap = find_program (
'scripts/carla_single_wrap.sh')
lv2lint_wrap = find_program (
'scripts/lv2lint_wrap.sh')
lv2_validate_wrap = find_program (
'scripts/lv2_validate_wrap.sh')
# dependencies
ztoolkit_dep = dependency(
@ -59,7 +72,7 @@ elif host_machine.system() == 'windows' @@ -59,7 +72,7 @@ elif host_machine.system() == 'windows'
endif
prefix = get_option('prefix')
lv2dir = join_paths(prefix, get_option('lv2dir'))
lv2dir = prefix / get_option('lv2dir')
# cflags
common_cflags = cc.get_supported_arguments([

36
plugins/meson.build

@ -255,31 +255,33 @@ if get_option ('plugins').contains (pl[0]) @@ -255,31 +255,33 @@ if get_option ('plugins').contains (pl[0])
# test
pl_build_dir = meson.current_build_dir ()
lv2lint = find_program ('lv2lint', required: false)
lv2_validate = find_program (
'lv2_validate', required: false)
sord_validate = find_program (
'sord_validate', required: false)
test_env = environment ({
'PL_BUILD_DIR': pl_build_dir,
'PL_NAME': pl_str,
'PL_URI': pl_uri,
'LIBEXT': libext,
'LV2_DIR': lv2dir,
})
if lv2lint.found() and (os_linux or os_freebsd)
lv2lint_wrap = find_program (
join_paths ('..', 'scripts', 'lv2lint_wrap.sh'))
test (
'LV2 lint', lv2lint_wrap,
args: [
lv2lint.path(), pl_build_dir, pl_str,
pl_uri, libext,
],
args: [ lv2lint.path () ],
env: test_env,
suite: pl[0])
endif
if lv2_validate.found() and sord_validate.found()
lv2_validate_wrap = find_program (
join_paths ('..', 'scripts', 'lv2_validate_wrap.sh'))
test (
'LV2 validate', lv2_validate_wrap,
args: [
lv2_validate.path(), pl_build_dir, pl_str,
pl_uri, libext,
],
args: [ lv2_validate.path() ],
env: test_env,
suite: pl[0])
endif
if carla_single.found () and not pl_str.contains ('LFO')
test (
'Carla single', carla_single_wrap,
args: [ carla_single.path () ],
env: test_env,
timeout: 60,
suite: pl[0])
endif
endif

32
scripts/carla_single_wrap.sh

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
#!/usr/bin/env bash
# $1: carla-single
set -o xtrace
set -e
carla_single_bin=$1
tmpdir=$(mktemp -d /tmp/carla_single_wrap.XXXXXXXXX)
tmp_plugin_dir="$tmpdir/$PL_NAME"
mkdir -p "$tmp_plugin_dir"
cp $PL_BUILD_DIR/$PL_NAME.ttl \
$PL_BUILD_DIR/${PL_NAME}_dsp$LIBEXT $tmp_plugin_dir/
if [ -e $PL_BUILD_DIR/${PL_NAME}_ui$LIBEXT ] ; then
cp $PL_BUILD_DIR/${PL_NAME}_ui$LIBEXT $tmp_plugin_dir/
fi
cp $PL_BUILD_DIR/${PL_NAME}_manifest.ttl $tmp_plugin_dir/manifest.ttl
for lv2dir in atom.lv2 buf-size.lv2 core.lv2 data-access.lv2 \
dynmanifest.lv2 event.lv2 instance-access.lv2 log.lv2 midi.lv2 \
morph.lv2 options.lv2 parameters.lv2 patch.lv2 port-groups.lv2 \
port-props.lv2 presets.lv2 resize-port.lv2 schemas.lv2 \
state.lv2 time.lv2 ui.lv2 units.lv2 urid.lv2 uri-map.lv2 \
worker.lv2; do
cp -r $LV2_DIR/$lv2dir $tmpdir/
done
LV2_PATH="$tmpdir" \
CARLA_BRIDGE_DUMMY=1 \
CARLA_BRIDGE_TESTING=native \
env $carla_single_bin $PL_URI
rm -rf $tmpdir

24
scripts/lv2_validate_wrap.sh

@ -1,17 +1,10 @@ @@ -1,17 +1,10 @@
#!/usr/bin/env bash
# $1: lv2_validate
# $2: plugin build dir
# $3: plugin name
# $4: plugin URI
set -o xtrace
set -e
LV2_VALIDATE_BIN=$1
PL_BUILD_DIR=$2
PL_NAME=$3
PL_URI=$4
LIBEXT=$5
lv2_validate_bin=$1
tmpdir=$(mktemp -d /tmp/lv2_validate_wrap.XXXXXXXXX)
tmp_plugin_dir="$tmpdir/$PL_NAME"
@ -21,6 +14,17 @@ cp $PL_BUILD_DIR/$PL_NAME.ttl \ @@ -21,6 +14,17 @@ cp $PL_BUILD_DIR/$PL_NAME.ttl \
if [ -e $PL_BUILD_DIR/${PL_NAME}_ui$LIBEXT ] ; then
cp $PL_BUILD_DIR/${PL_NAME}_ui$LIBEXT $tmp_plugin_dir/
fi
cp $PL_BUILD_DIR/$3_manifest.ttl $tmp_plugin_dir/manifest.ttl
cp $PL_BUILD_DIR/${PL_NAME}_manifest.ttl $tmp_plugin_dir/manifest.ttl
for lv2dir in atom.lv2 buf-size.lv2 core.lv2 data-access.lv2 \
dynmanifest.lv2 event.lv2 instance-access.lv2 log.lv2 midi.lv2 \
morph.lv2 options.lv2 parameters.lv2 patch.lv2 port-groups.lv2 \
port-props.lv2 presets.lv2 resize-port.lv2 schemas.lv2 \
state.lv2 time.lv2 ui.lv2 units.lv2 urid.lv2 uri-map.lv2 \
worker.lv2; do
cp -r $LV2_DIR/$lv2dir $tmpdir/
done
LV2_PATH="$tmpdir" env $LV2_VALIDATE_BIN $PL_URI
LV2_PATH="$tmpdir" \
env $lv2_validate_bin $PL_URI
rm -rf $tmpdir

24
scripts/lv2lint_wrap.sh

@ -1,17 +1,10 @@ @@ -1,17 +1,10 @@
#!/usr/bin/env bash
# $1: lv2lint
# $2: plugin build dir
# $3: plugin name
# $4: plugin URI
set -o xtrace
set -e
LV2_LINT_BIN=$1
PL_BUILD_DIR=$2
PL_NAME=$3
PL_URI=$4
LIBEXT=$5
lv2_lint_bin=$1
tmpdir=$(mktemp -d /tmp/lv2lint_wrap.XXXXXXXXX)
tmp_plugin_dir="$tmpdir/$PL_NAME"
@ -21,7 +14,18 @@ cp $PL_BUILD_DIR/$PL_NAME.ttl \ @@ -21,7 +14,18 @@ cp $PL_BUILD_DIR/$PL_NAME.ttl \
if [ -e $PL_BUILD_DIR/${PL_NAME}_ui$LIBEXT ] ; then
cp $PL_BUILD_DIR/${PL_NAME}_ui$LIBEXT $tmp_plugin_dir/
fi
cp $PL_BUILD_DIR/$3_manifest.ttl $tmp_plugin_dir/manifest.ttl
cp $PL_BUILD_DIR/${PL_NAME}_manifest.ttl $tmp_plugin_dir/manifest.ttl
for lv2dir in atom.lv2 buf-size.lv2 core.lv2 data-access.lv2 \
dynmanifest.lv2 event.lv2 instance-access.lv2 log.lv2 midi.lv2 \
morph.lv2 options.lv2 parameters.lv2 patch.lv2 port-groups.lv2 \
port-props.lv2 presets.lv2 resize-port.lv2 schemas.lv2 \
state.lv2 time.lv2 ui.lv2 units.lv2 urid.lv2 uri-map.lv2 \
worker.lv2; do
cp -r $LV2_DIR/$lv2dir $tmpdir/
done
LV2_PATH="$tmpdir" env $LV2_LINT_BIN -d \
LV2_PATH="$tmpdir" \
env $lv2_lint_bin -d \
-I $tmp_plugin_dir/ $PL_URI
rm -rf $tmpdir

Loading…
Cancel
Save