]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (run.sh) detect builddir from working directory
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 21 Jun 2023 12:26:05 +0000 (14:26 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sun, 25 Jun 2023 07:06:47 +0000 (09:06 +0200)
This makes it easier to run test.sh from the build directory as
everything will work without any parameters irrespective of the build
directories name.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
tests/run.sh

index 1bfaec514dc070e63cd77090d00e845bb85695aa..214e2fcd6b768a58f8430bbc40c3997f4ff249ca 100755 (executable)
@@ -156,6 +156,8 @@ if [ -z "$top_builddir" ]; then
        top_builddir="$TS_TOPDIR/.."
        if [ -e "$top_builddir/build/meson.conf" ]; then
                top_builddir="$TS_TOPDIR/../build"
+       elif [ -e "$PWD/meson.conf" ]; then
+               top_builddir="$PWD"
        fi
 fi