summaryrefslogtreecommitdiff
path: root/source4/script/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-01-26 11:47:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:30 -0500
commit4e3ee3f898bb5d6d83d6448a62ac320bcc556202 (patch)
treeed3cde7f046af50faf42a68617efb79f174be36b /source4/script/tests
parent8adec6d36373e89c0037105c0867fe6776c45449 (diff)
downloadsamba-4e3ee3f898bb5d6d83d6448a62ac320bcc556202.tar.gz
samba-4e3ee3f898bb5d6d83d6448a62ac320bcc556202.tar.bz2
samba-4e3ee3f898bb5d6d83d6448a62ac320bcc556202.zip
r13160: Fix some of the smbclient testsuite (after failures on the buildfarm)
(This used to be commit 765991ab486188bce76332b00194efbd6cbb3e01)
Diffstat (limited to 'source4/script/tests')
-rwxr-xr-xsource4/script/tests/test_smbclient.sh38
1 files changed, 17 insertions, 21 deletions
diff --git a/source4/script/tests/test_smbclient.sh b/source4/script/tests/test_smbclient.sh
index de3ac13fe7..47c9c14a66 100755
--- a/source4/script/tests/test_smbclient.sh
+++ b/source4/script/tests/test_smbclient.sh
@@ -16,12 +16,7 @@ shift 5
failed=0
runcmd() {
- desc=$1
- cmd=$2
- shift 2
- echo $cmd
- bin/smbclient -c "$cmd" //$SERVER/tmp -U $DOMAIN\\$USERNAME%$PASSWORD
- return $?
+ testit "$1" bin/smbclient //$SERVER/tmp -W "$DOMAIN "-U"$USERNAME"%"$PASSWORD"
}
incdir=`dirname $0`
@@ -35,36 +30,37 @@ bloe
blah
EOF
+
# put that file
-runcmd "Putting file" "mput tmpfile" || failed=`expr $failed + 1`
+echo mput tmpfile | runcmd "Putting file" || failed=`expr $failed + 1`
# check file info
-runcmd "Getting alternative name" "altname tmpfile" || failed=`expr $failed + 1`
+echo altname tmpfile | runcmd "Getting alternative name" || failed=`expr $failed + 1`
# run allinfo on that file
-runcmd "Checking info on file" "allinfo tmpfile" || failed=`expr $failed + 1`
+echo allinfo tmpfile | runcmd "Checking info on file" || failed=`expr $failed + 1`
# get that file
mv tmpfile tmpfile-old
-runcmd "Getting file" "mget tmpfile" || failed=`expr $failed + 1`
+echo mget tmpfile | runcmd "Getting file" || failed=`expr $failed + 1`
# remove that file
-runcmd "Removing file" "rm tmpfile" || failed=`expr $failed + 1`
+echo rm tmpfile | runcmd "Removing file" || failed=`expr $failed + 1`
# compare locally
-diff tmpfile-old tmpfile
+testit "Comparing files" diff tmpfile-old tmpfile || failed=`expr $failed + 1`
# create directory
-runcmd "Creating directory" "mkdir bla" || failed=`expr $failed + 1`
+echo mkdir bla | runcmd "Creating directory" || failed=`expr $failed + 1`
# cd to directory
-runcmd "Changing directory" "cd bla" || failed=`expr $failed + 1`
+echo cd bla | runcmd "Changing directory" || failed=`expr $failed + 1`
# cd to top level directory
-runcmd "Going back" "cd .." || failed=`expr $failed + 1`
+echo cd .. | runcmd "Going back" || failed=`expr $failed + 1`
# remove directory
-runcmd "Removing directory" "rmdir bla" || failed=`expr $failed + 1`
+echo rmdir bla | runcmd "Removing directory" || failed=`expr $failed + 1`
# enable recurse, create nested directory
-runcmd "Creating nested directory" "recurse; mkdir bla/bloe" || failed=`expr $failed + 1`
+echo "recurse; echo mkdir bla/bloe; exit" | runcmd "Creating nested directory" || failed=`expr $failed + 1`
# remove parent directory
-runcmd "Removing directory" "rmdir bla/bloe" || failed=`expr $failed + 1`
+echo rmdir bla/bloe | runcmd "Removing directory" || failed=`expr $failed + 1`
# remove child directory
-runcmd "Removing directory" "rmdir bla" || failed=`expr $failed + 1`
+echo rmdir bla | runcmd "Removing directory" || failed=`expr $failed + 1`
# run fsinfo
-runcmd "Getting file system info" "fsinfo objectid" || failed=`expr $failed + 1`
+echo fsinfo objectid | runcmd "Getting file system info" || failed=`expr $failed + 1`
-rm tmpfile tmpfile-old
+rm -f tmpfile tmpfile-old
testok $0 $failed