]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
testprogs: Use system_or_builddir_binary() for dbcheck and runtime tests
authorAndreas Schneider <asn@samba.org>
Thu, 22 Dec 2022 11:57:39 +0000 (12:57 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 23 Dec 2022 14:35:31 +0000 (14:35 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
testprogs/blackbox/common-links.sh
testprogs/blackbox/dbcheck-links.sh
testprogs/blackbox/runtime-links.sh

index 92cf730ffc06e3eb0eeee69859cf4fa7e4fae0ec..281b0d9c196def26ca3c43db24953938717a24b7 100644 (file)
@@ -1,34 +1,11 @@
 release_dir=$SRCDIR_ABS/source4/selftest/provisions/$RELEASE
 
-ldbadd="ldbadd"
-if [ -x "$BINDIR/ldbadd" ]; then
-       ldbadd="$BINDIR/ldbadd"
-fi
-
-ldbmodify="ldbmodify"
-if [ -x "$BINDIR/ldbmodify" ]; then
-       ldbmodify="$BINDIR/ldbmodify"
-fi
-
-ldbdel="ldbdel"
-if [ -x "$BINDIR/ldbdel" ]; then
-       ldbdel="$BINDIR/ldbdel"
-fi
-
-ldbsearch="ldbsearch"
-if [ -x "$BINDIR/ldbsearch" ]; then
-       ldbsearch="$BINDIR/ldbsearch"
-fi
-
-ldbrename="ldbrename"
-if [ -x "$BINDIR/ldbrename" ]; then
-       ldbrename="$BINDIR/ldbrename"
-fi
-
-samba_tdbrestore="tdbrestore"
-if [ -x "$BINDIR/tdbrestore" ]; then
-       samba_tdbrestore="$BINDIR/tdbrestore"
-fi
+ldbadd=$(system_or_builddir_binary ldbadd "${BINDIR}")
+ldbmodify=$(system_or_builddir_binary ldbmodify "${BINDIR}")
+ldbdel=$(system_or_builddir_binary ldbdel "${BINDIR}")
+ldbsearch=$(system_or_builddir_binary ldbsearch "${BINDIR}")
+ldbrename=$(system_or_builddir_binary ldbrename "${BINDIR}")
+samba_tdbrestore=$(system_or_builddir_binary tdbrestore "${BINDIR}")
 
 samba_undump="$SRCDIR_ABS/source4/selftest/provisions/undump.sh"
 
index 29fb5b85abcc6bfd92017da15e8f2d39b7c63ea1..aaf93a8cc487b3355bb5e3e679b3216cb0cde5b8 100755 (executable)
@@ -13,8 +13,8 @@ shift 2
 
 . $(dirname $0)/subunit.sh
 
-. $(dirname $0)/common-links.sh
 . $(dirname $0)/common_test_fns.inc
+. $(dirname $0)/common-links.sh
 
 failed=0
 
index 3862dd973d9037b8ff421cf11aedfdc9bbc7ae03..0da06bd7273d3a0a376abf002d48ef2fe50941e7 100755 (executable)
@@ -15,9 +15,9 @@ failed=0
 
 . $(dirname $0)/subunit.sh
 
+. $(dirname $0)/common_test_fns.inc
 . $(dirname $0)/common-links.sh
 
-. $(dirname $0)/common_test_fns.inc
 
 if [ ! -x $samba_undump ] || [ ! -d $release_dir ]; then
        subunit_start_test $RELEASE