Browse Source

fix lv2_validate test

faust
Alexandros Theodotou 3 years ago
parent
commit
0c3666902a
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 9
      plugins/meson.build
  2. 25
      scripts/lv2_validate_wrap.sh
  3. 4
      scripts/lv2lint_wrap.sh

9
plugins/meson.build

@ -264,9 +264,14 @@ if get_option ('plugins').contains (pl[0]) @@ -264,9 +264,14 @@ if get_option ('plugins').contains (pl[0])
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,
args: pl_ttl,
'LV2 validate', lv2_validate_wrap,
args: [
lv2lint.path(), pl_build_dir, pl_str,
pl_uri,
],
suite: pl[0])
endif
endif

25
scripts/lv2_validate_wrap.sh

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
#!/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
tmpdir=$(mktemp -d /tmp/lv2lint_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.so $tmp_plugin_dir/
if [ -e $PL_BUILD_DIR/${PL_NAME}_ui.so ] ; then
cp $PL_BUILD_DIR/${PL_NAME}_ui.so $tmp_plugin_dir/
fi
cp $PL_BUILD_DIR/$3_manifest.ttl $tmp_plugin_dir/manifest.ttl
LV2_PATH="$tmpdir" env $LV2_VALIDATE_BIN $PL_URI

4
scripts/lv2lint_wrap.sh

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
# $4: plugin URI
set -o xtrace
set -e
LV2_LINT_BIN=$1
PL_BUILD_DIR=$2
@ -16,6 +17,9 @@ tmp_plugin_dir="$tmpdir/$PL_NAME" @@ -16,6 +17,9 @@ tmp_plugin_dir="$tmpdir/$PL_NAME"
mkdir -p "$tmp_plugin_dir"
cp $PL_BUILD_DIR/$PL_NAME.ttl \
$PL_BUILD_DIR/${PL_NAME}_dsp.so $tmp_plugin_dir/
if [ -e $PL_BUILD_DIR/${PL_NAME}_ui.so ] ; then
cp $PL_BUILD_DIR/${PL_NAME}_ui.so $tmp_plugin_dir/
fi
cp $PL_BUILD_DIR/$3_manifest.ttl $tmp_plugin_dir/manifest.ttl
LV2_PATH="$tmpdir" env $LV2_LINT_BIN -d \

Loading…
Cancel
Save