From: Andreas Schneider Date: Thu, 22 Dec 2022 12:45:17 +0000 (+0100) Subject: testprogs: Use system_or_builddir_binary() for test_net_ads X-Git-Tag: talloc-2.4.0~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=376ca5a108f4e6e1e34166a7bd6047122f424744;p=thirdparty%2Fsamba.git testprogs: Use system_or_builddir_binary() for test_net_ads Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- diff --git a/testprogs/blackbox/test_net_ads.sh b/testprogs/blackbox/test_net_ads.sh index b46a0e36489..0f096feb6f3 100755 --- a/testprogs/blackbox/test_net_ads.sh +++ b/testprogs/blackbox/test_net_ads.sh @@ -26,28 +26,14 @@ failed=0 net_tool="$BINDIR/net --configfile=$BASEDIR/$WORKDIR/client.conf --option=security=ads" -ldbsearch="ldbsearch" -if [ -x "$BINDIR/ldbsearch" ]; then - ldbsearch="$BINDIR/ldbsearch" -fi - -ldbadd="ldbadd" -if [ -x "$BINDIR/ldbadd" ]; then - ldbadd="$BINDIR/ldbadd" -fi - -ldbdel="ldbdel" -if [ -x "$BINDIR/ldbdel" ]; then - ldbdel="$BINDIR/ldbdel" -fi - -ldbmodify="ldbmodify" -if [ -x "$BINDIR/ldbmodify" ]; then - ldbmodify="$BINDIR/ldbmodify" -fi - # Load test functions . $(dirname $0)/subunit.sh +. "$(dirname "${0}")/common_test_fns.inc" + +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}") testit "join" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1)