diff --git a/plugins/meson.build b/plugins/meson.build index 9d2fe24..f13af8a 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -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 diff --git a/scripts/lv2_validate_wrap.sh b/scripts/lv2_validate_wrap.sh new file mode 100755 index 0000000..0437150 --- /dev/null +++ b/scripts/lv2_validate_wrap.sh @@ -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 diff --git a/scripts/lv2lint_wrap.sh b/scripts/lv2lint_wrap.sh index 6f17710..ec9d844 100755 --- a/scripts/lv2lint_wrap.sh +++ b/scripts/lv2lint_wrap.sh @@ -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" 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 \