Browse Source

Add lv2lint, start audio plugin test scripts

Signed-off-by: falkTX <falktx@falktx.com>
master
falkTX 2 years ago
parent
commit
50be23c0f4
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
10 changed files with 199 additions and 3 deletions
  1. +8
    -0
      sources/.gitignore
  2. +7
    -0
      sources/libs/kxstudio-build-scripts/debian/changelog
  3. +1
    -1
      sources/libs/kxstudio-build-scripts/debian/control
  4. +7
    -0
      sources/libs/kxstudio-build-scripts/kxstudio-audio-plugin.mk
  5. +89
    -0
      sources/libs/kxstudio-build-scripts/kxstudio-audio-plugin.sh
  6. +47
    -0
      sources/libs/kxstudio-build-scripts/kxstudio-audio-plugin.supp
  7. +1
    -2
      sources/libs/lilv-static/debian/control
  8. +5
    -0
      sources/libs/lv2lint/debian/changelog
  9. +24
    -0
      sources/libs/lv2lint/debian/control
  10. +10
    -0
      sources/libs/lv2lint/debian/rules

+ 8
- 0
sources/.gitignore View File

@@ -4,11 +4,14 @@
*.debian.*
*.dsc
*.orig.*
*.tar.*

files
include-binaries

/libs/*/*
!/libs/*/debian
/libs/*/debian/*
!/libs/*/debian/patches/*.patch
!/libs/*/debian/patches/series
!/libs/*/debian/source/format
@@ -16,4 +19,9 @@ include-binaries
!/libs/*/debian/control
!/libs/*/debian/rules

!/libs/kxstudio-build-scripts/*.mk
!/libs/kxstudio-build-scripts/*.sh
!/libs/kxstudio-build-scripts/*.supp
!/libs/kxstudio-build-scripts/debian/copyright

/kxstudio/kxstudio-repos/keyrings/

+ 7
- 0
sources/libs/kxstudio-build-scripts/debian/changelog View File

@@ -1,3 +1,10 @@
kxstudio-build-scripts (4) focal; urgency=medium

* Add lv2lint and lilv-utils as dependencies
* Start audio plugin test scripts

-- falkTX <falktx@falktx.com> Mon, 09 May 2022 10:11:38 +0100

kxstudio-build-scripts (3) focal; urgency=medium

* Build carla for testing plugins


+ 1
- 1
sources/libs/kxstudio-build-scripts/debian/control View File

@@ -14,7 +14,7 @@ Description: Build scripts for KXStudio repositories

Package: kxstudio-audio-plugin-tester
Architecture: all
Depends: ${misc:Depends}, kxstudio-build-scripts, lv2lint
Depends: ${misc:Depends}, kxstudio-build-scripts, lilv-utils, lv2lint, valgrind
Description: Audio plugin test setup for KXStudio repositories
This package provides the setup used for testing audio plugins
in the KXStudio repositories.

+ 7
- 0
sources/libs/kxstudio-build-scripts/kxstudio-audio-plugin.mk View File

@@ -0,0 +1,7 @@
#!/usr/bin/make -f

include /usr/share/dpkg/kxstudio.mk

define kxstudio_audio_plugin_test
/usr/share/dpkg/kxstudio-audio-plugin.sh
endef

+ 89
- 0
sources/libs/kxstudio-build-scripts/kxstudio-audio-plugin.sh View File

@@ -0,0 +1,89 @@
#!/bin/bash

set -e

if [ "$(cat debian/control | grep 'Package: ' | wc -l)" -eq 1 ]; then
PKG_NAME=$(cat debian/control | awk 'sub("Package: ","")')
else
PKG_NAME=${PKG_NAME:=tmp}
fi

if [ ! -d debian/${PKG_NAME} ]; then
echo "package is not installed, abort!"
exit 1
fi

if [ -d debian/${PKG_NAME}/usr/local/lib ]; then
echo "error: files are installed in /usr/local"
exit 1
fi

if [ -d debian/${PKG_NAME}/usr/lib/x86_64-linux-gnu ]; then
echo "error: files are installed in multi-arch lib dir"
exit 1
fi

CARLA_BRIDGE_NATIVE_BIN=/opt/kxstudio/lib/carla/carla-bridge-native
CARLA_DISCOVERY_NATIVE_BIN=/opt/kxstudio/lib/carla/carla-discovery-native

VALRIND_BIN="valgrind --error-exitcode=255 --leak-check=full --track-origins=yes --suppressions=$(dirname ${0})/kxstudio-audio-plugin.supp"
VALRIND_BRIDGE_BIN="${VALRIND_BIN} ${CARLA_BRIDGE_NATIVE_BIN}"
VALRIND_DISCOVERY_BIN="${VALRIND_BIN} ${CARLA_DISCOVERY_NATIVE_BIN}"

export CARLA_BRIDGE_DUMMY=1
export CARLA_BRIDGE_TESTING=native
export LV2_PATH=$(pwd)/debian/${PKG_NAME}/usr/lib/lv2:/tmp/lv2-spec

rm -rf /tmp/lv2-spec
mkdir /tmp/lv2-spec
cp -r /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 /tmp/lv2-spec/

if [ -d debian/${PKG_NAME}/usr/lib/lv2 ]; then
pushd debian/${PKG_NAME}/usr/lib/lv2
lv2_validate */*.ttl
lv2lint $(lv2ls)
# -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
for p in $(ls); do
${VALRIND_DISCOVERY_BIN} lv2 ./${p}
done
for p in $(lv2ls); do
${VALRIND_BRIDGE_BIN} lv2 "" ${p} 1>/dev/null;
done
popd
fi

if [ -d debian/${PKG_NAME}/usr/lib/ladspa ]; then
pushd debian/${PKG_NAME}/usr/lib/ladspa
for p in $(ls); do
${VALRIND_DISCOVERY_BIN} ladspa ./${p}
${VALRIND_BRIDGE_BIN} ladspa ./${p} "" 1>/dev/null;
done
popd
fi

if [ -d debian/${PKG_NAME}/usr/lib/dssi ]; then
pushd debian/${PKG_NAME}/usr/lib/dssi
for p in $(ls); do
${VALRIND_DISCOVERY_BIN} dssi ./${p}
${VALRIND_BRIDGE_BIN} dssi ./${p} "" 1>/dev/null;
done
popd
fi

if [ -d debian/${PKG_NAME}/usr/lib/vst ]; then
pushd debian/${PKG_NAME}/usr/lib/vst
for p in $(ls .so */*.so 2>/dev/null | grep -e '.*\.so' -e '.*\.vst/.*\.so' | grep -v 'lib.*\.so' | grep -v 'carla-bridge-lv2.so'); do
${VALRIND_DISCOVERY_BIN} vst2 ./${p}
${VALRIND_BRIDGE_BIN} vst2 ./${p} "" 1>/dev/null;
done
popd
fi

if [ -d debian/${PKG_NAME}/usr/lib/vst3 ]; then
pushd debian/${PKG_NAME}/usr/lib/vst3
for p in $(ls); do
${VALRIND_DISCOVERY_BIN} vst3 ./${p}
${VALRIND_BRIDGE_BIN} vst3 ./${p} "" 1>/dev/null;
done
popd
fi

+ 47
- 0
sources/libs/kxstudio-build-scripts/kxstudio-audio-plugin.supp View File

@@ -0,0 +1,47 @@
{
libdl is full of leaks
Memcheck:Leak
...
fun:_dl_open
...
}
{
libdl is full of leaks
Memcheck:Leak
...
fun:_dl_close
...
}
{
libdl is full of leaks
Memcheck:Leak
...
fun:_dl_init
}
{
libdl is full of leaks
Memcheck:Leak
...
fun:_dl_allocate_tls
...
}
{
libdl is full of leaks
Memcheck:Leak
...
fun:call_init.part.0
}
{
ignore XInitThreads
Memcheck:Leak
...
fun:XInitThreads
...
}
{
ignore XrmGetStringDatabase
Memcheck:Leak
...
fun:XrmGetStringDatabase
...
}

+ 1
- 2
sources/libs/lilv-static/debian/control View File

@@ -7,8 +7,7 @@ Build-Depends: debhelper-compat (= 13),
python3,
pkg-config,
libsndfile-static,
libsratom-static,
libjack-dev | libjack-jackd2-dev
libsratom-static
Standards-Version: 4.5.0
Homepage: http://drobilla.net/software/lilv/
Rules-Requires-Root: no


+ 5
- 0
sources/libs/lv2lint/debian/changelog View File

@@ -0,0 +1,5 @@
lv2lint (6:0.16.2-1kxstudio2) focal; urgency=medium

* Initial package

-- falkTX <falktx@falktx.com> Sun, 17 Apr 2022 15:05:47 +0100

+ 24
- 0
sources/libs/lv2lint/debian/control View File

@@ -0,0 +1,24 @@
Source: lv2lint
Section: libs
Priority: optional
Maintainer: falkTX <falktx@falktx.com>
Build-Depends: debhelper-compat (= 13),
kxstudio-build-scripts,
meson,
pkg-config,
libelf-dev,
libx11-dev,
liblilv-static
Standards-Version: 4.5.0
XSC-KXStudio-VCS: https://open-music-kontrollers.ch/lv2/lv2lint/
Rules-Requires-Root: no

Package: lv2lint
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, lv2-dev
Description: Check whether a given LV2 plugin is up to the specification
lv2lint is an LV2 lint-like tool that checks whether a given plugin and its
UI(s) match up with the provided metadata and adhere to well-known best practices.
.
Run it as part of your continuous integration pipeline together with lv2/sord_validate
to reduce the likelihood of shipping plugins with major flaws in order to prevent unsatisfied users.

+ 10
- 0
sources/libs/lv2lint/debian/rules View File

@@ -0,0 +1,10 @@
#!/usr/bin/make -f

KXSTUDIO_NO_FASTMATH = y
include /usr/share/dpkg/kxstudio.mk

override_dh_auto_configure:
dh_auto_configure -- -Delf-tests=enabled -Dx11-tests=enabled -Donline-tests=disabled

%:
dh $@ -Smeson

Loading…
Cancel
Save