summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-06-26 07:41:40 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-06-26 07:41:40 +0000
commit542977bc4323e041512e91d7a38422e7abc4e5ae (patch)
tree6be5a3ec2261e6b53a5016204b272515d28d76fc /testsuite
parent274c0f5028d41175222dfaaf446e3ed8f5687a5f (diff)
downloadsamba-542977bc4323e041512e91d7a38422e7abc4e5ae.tar.gz
samba-542977bc4323e041512e91d7a38422e7abc4e5ae.tar.xz
samba-542977bc4323e041512e91d7a38422e7abc4e5ae.zip
Added the basic tests of smb functionality for HEAD
This works with the new build farm system Andrew Bartlett
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/build_farm/basicsmb.smb.conf.template24
-rw-r--r--testsuite/build_farm/basicsmb.test57
-rw-r--r--testsuite/build_farm/runlist1
3 files changed, 82 insertions, 0 deletions
diff --git a/testsuite/build_farm/basicsmb.smb.conf.template b/testsuite/build_farm/basicsmb.smb.conf.template
new file mode 100644
index 00000000000..3f33973eb9d
--- /dev/null
+++ b/testsuite/build_farm/basicsmb.smb.conf.template
@@ -0,0 +1,24 @@
+[global]
+ workgroup = TESTWG
+ log level = 3
+ encrypt passwords = yes
+ server string = Samba %v Build Farm Tests
+
+[test]
+ path = PREFIX/testdir
+ read only = no
+
+[samba]
+ path = BUILD_FARM/samba
+ read only = yes
+ comment = Samba HEAD Sources
+
+[samba_2_2]
+ path = BUILD_FARM/samba_2_2
+ read only = yes
+ comment = Samba 2.2. Sources
+
+[rsync]
+ path = BUILD_FARM/rsync
+ read only = yes
+ comment = Rsync Sources
diff --git a/testsuite/build_farm/basicsmb.test b/testsuite/build_farm/basicsmb.test
new file mode 100644
index 00000000000..27808a434f2
--- /dev/null
+++ b/testsuite/build_farm/basicsmb.test
@@ -0,0 +1,57 @@
+test_smb_conf_setup() {
+ cat basicsmb.smb.conf.template | sed "s|PREFIX|$prefix|g" | sed "s|BUILD_FARM|$pwd|g" > $prefix/lib/smb.conf
+ echo "Setting up smb.conf:"
+ cat $prefix/lib/smb.conf
+
+}
+
+test_smbpasswd() {
+ ( echo $password ; echo $password; ) | $prefix/bin/smbpasswd -L -s -a $whoami
+ status=$?
+ if [ $status = 0 ]; then
+ echo "smbpasswd correctly set inital password ($password)"
+ else
+ echo "smbpasswd failed to set inital password ($password)!"
+ return 1
+ fi
+ return 0
+}
+
+test_sharelist() {
+ if $prefix/bin/smbclient -U$whoami% -L $host; then
+ echo "smbd listed shares OK"
+ else
+ echo "listing shares with smbd failed with $?"
+ return 1
+ fi
+ return 0
+}
+
+test_listfiles() {
+ if $prefix/bin/smbclient //$host/samba -U$whoami% -c 'ls'; then
+ echo "listed files OK"
+ else
+ echo "listing files with smbd failed with $?"
+ return 1
+ fi
+ return 0
+}
+
+test_listfilesauth() {
+ if $prefix/bin/smbclient //$host/samba_2_2 -U$whoami%$password -c 'ls'; then
+ echo "listed files OK"
+ else
+ echo "listing files with smbd failed with $?"
+ return 1
+ fi
+ return 0
+}
+
+
+(test_smb_conf_setup && test_smbpasswd) || exit 1
+
+test_sharelist
+test_listfiles
+test_listfilesauth
+
+
diff --git a/testsuite/build_farm/runlist b/testsuite/build_farm/runlist
new file mode 100644
index 00000000000..5e9fe381ef2
--- /dev/null
+++ b/testsuite/build_farm/runlist
@@ -0,0 +1 @@
+TEST_ALL="basicsmb"