pipewire: use RUNNING_ON_VALGRIND to determine if we're in valgrind

This removes the use of the VALGRIND environment variable
This commit is contained in:
Peter Hutterer 2021-06-07 16:02:58 +10:00 committed by Wim Taymans
parent d9cc1a25f1
commit b6e27822e5
3 changed files with 5 additions and 4 deletions

View file

@ -36,7 +36,7 @@ gdb:
$(MAKE) run DBG=gdb
valgrind:
$(MAKE) run DBG="DISABLE_RTKIT=1 VALGRIND=1 valgrind --trace-children=yes"
$(MAKE) run DBG="DISABLE_RTKIT=1 valgrind --trace-children=yes"
test: all
ninja -C $(BUILD_ROOT) test

View file

@ -100,7 +100,7 @@ libpipewire = shared_library(pipewire_name, pipewire_sources,
version : libversion,
soversion : soversion,
c_args : libpipewire_c_args,
include_directories : [pipewire_inc, configinc, spa_inc],
include_directories : [pipewire_inc, configinc, spa_inc, includes_inc],
install : true,
dependencies : [dl_lib, mathlib, pthread_lib, libintl_dep, atomic_dep, ],
)

View file

@ -39,6 +39,8 @@
#include <locale.h>
#include <libintl.h>
#include <valgrind/valgrind.h>
#include <spa/utils/names.h>
#include <spa/utils/string.h>
#include <spa/support/cpu.h>
@ -489,8 +491,7 @@ void pw_init(int *argc, char **argv[])
if (support->registry != NULL)
return;
if ((str = getenv("VALGRIND")) != NULL)
support->in_valgrind = pw_properties_parse_bool(str);
support->in_valgrind = RUNNING_ON_VALGRIND;
if ((str = getenv("NO_COLOR")) != NULL)
support->no_color = true;