From 8dcf76f66198cee8fd4e3dd22ac1ddfc9e8d1b62 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 13 Sep 2020 15:38:03 +0100 Subject: [PATCH] audioconvert tests: Default to using an installed libspa-support This makes installed-tests (see commit b852b58f) do the right thing. For build-time testing, spa/plugins/audioconvert/meson.build overrides this with the SPA_PLUGIN_DIR environment variable, and for ad-hoc testing by developers, pw-uninstalled.sh sets the necessary variables. Signed-off-by: Simon McVittie --- spa/plugins/audioconvert/benchmark-fmt-ops.c | 2 ++ spa/plugins/audioconvert/benchmark-resample.c | 2 ++ spa/plugins/audioconvert/meson.build | 4 ++-- spa/plugins/audioconvert/test-fmt-ops.c | 2 ++ spa/plugins/audioconvert/test-helper.h | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/spa/plugins/audioconvert/benchmark-fmt-ops.c b/spa/plugins/audioconvert/benchmark-fmt-ops.c index 887919193..0f26ac4c4 100644 --- a/spa/plugins/audioconvert/benchmark-fmt-ops.c +++ b/spa/plugins/audioconvert/benchmark-fmt-ops.c @@ -22,6 +22,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include #include #include diff --git a/spa/plugins/audioconvert/benchmark-resample.c b/spa/plugins/audioconvert/benchmark-resample.c index 975b1e20f..597f9acaf 100644 --- a/spa/plugins/audioconvert/benchmark-resample.c +++ b/spa/plugins/audioconvert/benchmark-resample.c @@ -22,6 +22,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include #include #include diff --git a/spa/plugins/audioconvert/meson.build b/spa/plugins/audioconvert/meson.build index 5da43a63d..d1813872b 100644 --- a/spa/plugins/audioconvert/meson.build +++ b/spa/plugins/audioconvert/meson.build @@ -127,7 +127,7 @@ foreach a : test_apps test(a, executable(a, a + '.c', dependencies : [dl_lib, pthread_lib, mathlib ], - include_directories : [spa_inc ], + include_directories : [ configinc, spa_inc ], link_with : [ audioconvert, test_lib, audioconvertlib ], install_rpath : join_paths(spa_plugindir, 'audioconvert'), c_args : [ simd_cargs, '-D_GNU_SOURCE' ], @@ -159,7 +159,7 @@ foreach a : benchmark_apps benchmark(a, executable(a, a + '.c', dependencies : [dl_lib, pthread_lib, mathlib, ], - include_directories : [spa_inc ], + include_directories : [ configinc, spa_inc ], c_args : [ simd_cargs, '-D_GNU_SOURCE' ], link_with : [ audioconvert, audioconvertlib ], install_rpath : join_paths(spa_plugindir, 'audioconvert'), diff --git a/spa/plugins/audioconvert/test-fmt-ops.c b/spa/plugins/audioconvert/test-fmt-ops.c index 507f01976..7ef038a1c 100644 --- a/spa/plugins/audioconvert/test-fmt-ops.c +++ b/spa/plugins/audioconvert/test-fmt-ops.c @@ -22,6 +22,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include #include #include diff --git a/spa/plugins/audioconvert/test-helper.h b/spa/plugins/audioconvert/test-helper.h index d95317b43..6748a7395 100644 --- a/spa/plugins/audioconvert/test-helper.h +++ b/spa/plugins/audioconvert/test-helper.h @@ -38,7 +38,7 @@ static inline struct spa_handle *load_handle(const struct spa_support *support, char *path; if ((str = getenv("SPA_PLUGIN_DIR")) == NULL) - str = "."; + str = PLUGINDIR; len = strlen(str) + strlen(lib) + 2; path = alloca(len);