]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
testprogs: Reformat test_wintest.sh
authorAndreas Schneider <asn@samba.org>
Fri, 22 Apr 2022 13:46:06 +0000 (15:46 +0200)
committerPavel Filipensky <pfilipensky@samba.org>
Wed, 10 Aug 2022 13:17:31 +0000 (13:17 +0000)
shfmt -w -p -i 0 -fn testprogs/blackbox/test_wintest.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
testprogs/blackbox/test_wintest.sh

index 5019900e651aaa3d2470f0e6face3310c248f70c..1f95156fe541a12d0f5937111033e20c7798f737 100755 (executable)
@@ -2,43 +2,42 @@
 # Blackbox tests for testing against windows machines
 # Copyright (C) 2008 Jim McDonough
 
+testwithconf()
+{
+       # define test variables, startup/shutdown scripts
+       . $1
+       shift 1
 
-testwithconf() {
-# define test variables, startup/shutdown scripts
-. $1
-shift 1
+       if [ -n "$WINTEST_STARTUP" ]; then
+               . $WINTEST_STARTUP
+       fi
 
-if [ -n "$WINTEST_STARTUP" ]; then
-. $WINTEST_STARTUP;
-fi
-
-testit "smbtorture" $smbtorture //$SERVER/$SHARE RAW-OPEN -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
+       testit "smbtorture" $smbtorture //$SERVER/$SHARE RAW-OPEN -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=$(expr $failed + 1)
 
-if [ -n "$WINTEST_SHUTDOWN" ]; then
-. $WINTEST_SHUTDOWN;
-fi
+       if [ -n "$WINTEST_SHUTDOWN" ]; then
+               . $WINTEST_SHUTDOWN
+       fi
 }
 
-
 # main
 # skip without WINTEST_CONF_DIR
 if [ -z "$WINTEST_CONF_DIR" ]; then
-exit 0;
+       exit 0
 fi
 
 unset SOCKET_WRAPPER_DIR
 
 failed=0
 
-$basedir=`pwd`
+$basedir=$(pwd)
 
-samba4bindir=`dirname $0`/../../source4/bin
+samba4bindir=$(dirname $0)/../../source4/bin
 smbtorture=$samba4bindir/smbtorture
 
-. `dirname $0`/subunit.sh
+. $(dirname $0)/subunit.sh
 
 for wintest_conf in $WINTEST_CONF_DIR/*.conf; do
-testwithconf "$wintest_conf" $@;
+       testwithconf "$wintest_conf" $@
 done
 
 exit $failed