]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: make it compatible with meson
authorKarel Zak <kzak@redhat.com>
Mon, 22 Mar 2021 14:15:52 +0000 (15:15 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 22 Mar 2021 14:15:52 +0000 (15:15 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/run.sh

index 9e2a35c018ea3e4162cf72b0bf5de0ef0528e4e4..9d26406c4a591f20a3463ff65cbe9c7c3587f2d3 100755 (executable)
@@ -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