From d928b9afe2e928032e6cb7ed3dfc4ff63d535458 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 22 Mar 2021 15:15:52 +0100 Subject: [PATCH] tests: make it compatible with meson Signed-off-by: Karel Zak --- tests/run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/run.sh b/tests/run.sh index 9e2a35c018..9d26406c4a 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -154,6 +154,9 @@ if [ -z "$top_srcdir" ]; then fi if [ -z "$top_builddir" ]; then top_builddir="$TS_TOPDIR/.." + if [ -e "$top_builddir/build/meson.conf" ]; then + top_builddir="$TS_TOPDIR/../build" + fi fi OPTS="$OPTS --srcdir=$top_srcdir --builddir=$top_builddir" @@ -171,7 +174,9 @@ if [ -z "$has_asan_opt" ]; then fi if [ -z "$has_ubsan_opt" ]; then - ubsan=$(awk '/^UBSAN_LDFLAGS/ { print $3 }' $top_builddir/Makefile) + if [ -e "$top_builddir/Makefile" ]; then + ubsan=$(awk '/^UBSAN_LDFLAGS/ { print $3 }' $top_builddir/Makefile) + fi if [ -n "$ubsan" ]; then OPTS="$OPTS --memcheck-ubsan" fi -- 2.47.3