mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
test: fix test library path and fix test-functional with ASAN
Set LD_LIBRARY_PATH to have processes spawned by test load the right library. Mark openal-info test skipped if ASAN is enabled. The problem is that openal-info would need LD_PRELOAD to work properly then. Just disable the test then.
This commit is contained in:
parent
58d86cfb5f
commit
02aee17cc3
3 changed files with 13 additions and 1 deletions
|
|
@ -10,9 +10,14 @@
|
|||
|
||||
PWTEST(openal_info_test)
|
||||
{
|
||||
#ifdef OPENAL_INFO_PATH
|
||||
/* openal-info tries to load libpipewire, which would need
|
||||
* LD_PRELOAD=/lib64/libasan.so.XX to work when ASan is enabled. Don't try to
|
||||
* figure out the right preload, but just disable the test in that case.
|
||||
*/
|
||||
#if defined(OPENAL_INFO_PATH) && !defined(HAVE_ASAN)
|
||||
int status = pwtest_spawn(OPENAL_INFO_PATH, (char *[]){ "openal-info", NULL });
|
||||
pwtest_int_eq(WEXITSTATUS(status), 0);
|
||||
pwtest_int_eq(WIFSIGNALED(status), 0);
|
||||
return PWTEST_PASS;
|
||||
#else
|
||||
return PWTEST_SKIP;
|
||||
|
|
@ -24,6 +29,7 @@ PWTEST(pactl_test)
|
|||
#ifdef PACTL_PATH
|
||||
int status = pwtest_spawn(PACTL_PATH, (char *[]){ "pactl", "info", NULL });
|
||||
pwtest_int_eq(WEXITSTATUS(status), 0);
|
||||
pwtest_int_eq(WIFSIGNALED(status), 0);
|
||||
return PWTEST_PASS;
|
||||
#else
|
||||
return PWTEST_SKIP;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue