svn commit: samba r21017 - in branches/SAMBA_4_0: . source/script/tests testprogs/blackbox

jelmer at samba.org jelmer at samba.org
Thu Jan 25 12:39:14 GMT 2007


Author: jelmer
Date: 2007-01-25 12:39:13 +0000 (Thu, 25 Jan 2007)
New Revision: 21017

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21017

Log:
Actually run tests during test phase rather than when generating the recipe.
Added:
   branches/SAMBA_4_0/testprogs/blackbox/test_ldb.sh
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/script/tests/test_ldap.sh
   branches/SAMBA_4_0/source/script/tests/test_local.sh
   branches/SAMBA_4_0/source/script/tests/tests_all.sh
   branches/SAMBA_4_0/testprogs/blackbox/test_cifsdd.sh


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:merge
   - jelmer at samba.org-20060824212938-5923465160f6ab63
jelmer at samba.org-20060830112659-186f132eebc987cc
jelmer at samba.org-20060904121718-63b73248146c14f8
jelmer at samba.org-20060904124721-5e70ab0bd405f748
metze at samba.org-20061010151401-45a5a2ed52cfe172
jelmer at samba.org-20061016130323-400ce51ee51ab30e
jelmer at samba.org-20061016195822-c7783d3ea1a56a53
jelmer at samba.org-20061016230421-75bca2ad62945ede
jelmer at samba.org-20061017145110-8c83a3dd979f6a6a
jelmer at samba.org-20061029173623-eb0459f1d3eb5720
jelmer at samba.org-20070115022006-h5ef1deqflt940b6
jelmer at samba.org-20070116142934-hv99dpwbnq2znh8f
jelmer at samba.org-20070116144126-70rip3bppmvgs3t6
jelmer at samba.org-20070116151516-imvui4r33cj850j9
jelmer at samba.org-20070116154739-3tji4fft7964qgrj
jelmer at samba.org-20070116173900-iasa25stcfty6pbr
jelmer at samba.org-20070117144550-te3o0iy10y14iyo4
jelmer at samba.org-20070122000024-q911packyrjk69ud
jelmer at samba.org-20070122181120-3n8ah238pjbzylyo
jelmer at samba.org-20070122182054-6b26fqrdqyjhyeuc
jelmer at samba.org-20070122233549-k085tfo2o1eqz7mm
jelmer at samba.org-20070123002251-0smz35eva10x84tc
jelmer at samba.org-20070123003546-p0jl6j9tw79q5j1k
jelmer at samba.org-20070123012404-o9w5pmgkm94zsxlu
jelmer at samba.org-20070123094731-ns7dzzzqtb0dlcod

   + jelmer at samba.org-20060824212938-5923465160f6ab63
jelmer at samba.org-20060830112659-186f132eebc987cc
jelmer at samba.org-20060904121718-63b73248146c14f8
jelmer at samba.org-20060904124721-5e70ab0bd405f748
metze at samba.org-20061010151401-45a5a2ed52cfe172
jelmer at samba.org-20061016130323-400ce51ee51ab30e
jelmer at samba.org-20061016195822-c7783d3ea1a56a53
jelmer at samba.org-20061016230421-75bca2ad62945ede
jelmer at samba.org-20061017145110-8c83a3dd979f6a6a
jelmer at samba.org-20061029173623-eb0459f1d3eb5720
jelmer at samba.org-20070115022006-h5ef1deqflt940b6
jelmer at samba.org-20070116142934-hv99dpwbnq2znh8f
jelmer at samba.org-20070116144126-70rip3bppmvgs3t6
jelmer at samba.org-20070116151516-imvui4r33cj850j9
jelmer at samba.org-20070116154739-3tji4fft7964qgrj
jelmer at samba.org-20070116173900-iasa25stcfty6pbr
jelmer at samba.org-20070117144550-te3o0iy10y14iyo4
jelmer at samba.org-20070122000024-q911packyrjk69ud
jelmer at samba.org-20070122181120-3n8ah238pjbzylyo
jelmer at samba.org-20070122182054-6b26fqrdqyjhyeuc
jelmer at samba.org-20070122233549-k085tfo2o1eqz7mm
jelmer at samba.org-20070123002251-0smz35eva10x84tc
jelmer at samba.org-20070123003546-p0jl6j9tw79q5j1k
jelmer at samba.org-20070123012404-o9w5pmgkm94zsxlu
jelmer at samba.org-20070123094731-ns7dzzzqtb0dlcod
jelmer at samba.org-20070125123431-g3pqm92r31ez9xyc


Modified: branches/SAMBA_4_0/source/script/tests/test_ldap.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_ldap.sh	2007-01-25 10:29:04 UTC (rev 21016)
+++ branches/SAMBA_4_0/source/script/tests/test_ldap.sh	2007-01-25 12:39:13 UTC (rev 21017)
@@ -23,62 +23,10 @@
 incdir=`dirname $0`
 . $incdir/test_functions.sh
 
+
 for p in $PROTOCOLS; do
  for options in "" "--option=socket:testnonblock=true" "-U$USERNAME%$PASSWORD --option=socket:testnonblock=true" "-U$USERNAME%$PASSWORD"; do
-    echo "TESTING PROTOCOL $p with options $options"
-
-    testit "RootDSE" bin/ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base DUMMY=x dnsHostName highestCommittedUSN || failed=`expr $failed + 1`
-
-    echo "Getting defaultNamingContext"
-    BASEDN=`bin/ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base DUMMY=x defaultNamingContext | grep defaultNamingContext | awk '{print $2}'`
-    echo "BASEDN is $BASEDN"
-
-    testit "Listing Users" bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER '(objectclass=user)' sAMAccountName || failed=`expr $failed + 1`
-
-    testit "Listing Groups" bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER '(objectclass=group)' sAMAccountName || failed=`expr $failed + 1`
-
-    nentries=`bin/ldbsearch $options -H $p://$SERVER $CONFIGURATION '(|(|(&(!(groupType:1.2.840.113556.1.4.803:=1))(groupType:1.2.840.113556.1.4.803:=2147483648)(groupType:1.2.840.113556.1.4.804:=10))(samAccountType=805306368))(samAccountType=805306369))' sAMAccountName | grep sAMAccountName | wc -l`
-    echo "Found $nentries entries"
-    if [ $nentries -lt 10 ]; then
-	echo "Should have found at least 10 entries"
-	failed=`expr $failed + 1`
-    fi
-
-    echo "Check rootDSE for Controls"
-    nentries=`bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER -s base -b "" '(objectclass=*)' | grep -i supportedControl | wc -l`
-    if [ $nentries -lt 4 ]; then
-	echo "Should have found at least 4 entries"
-	failed=`expr $failed + 1`
-    fi
-
-    echo "Test Paged Results Control"
-    nentries=`bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER --controls=paged_results:1:5 '(objectclass=user)' | grep sAMAccountName | wc -l`
-    if [ $nentries -lt 1 ]; then
-	echo "Paged Results Control test returned 0 items"
-	failed=`expr $failed + 1`
-    fi
-
-    echo "Test Server Sort Control"
-    nentries=`bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER --controls=server_sort:1:0:sAMAccountName '(objectclass=user)' | grep sAMAccountName | wc -l`
-    if [ $nentries -lt 1 ]; then
-	echo "Server Sort Control test returned 0 items"
-	failed=`expr $failed + 1`
-    fi
-
-    echo "Test Extended DN Control"
-    nentries=`bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER --controls=extended_dn:1:0 '(objectclass=user)' | grep sAMAccountName | wc -l`
-    if [ $nentries -lt 1 ]; then
-	echo "Extended DN Control test returned 0 items"
-	failed=`expr $failed + 1`
-    fi
-
-    echo "Test Attribute Scope Query Control"
-    nentries=`bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER --controls=asq:1:member -s base -b "CN=Administrators,CN=Builtin,$BASEDN" | grep sAMAccountName | wc -l`
-   if [ $nentries -lt 1 ]; then
-	echo "Attribute Scope Query test returned 0 items"
-	failed=`expr $failed + 1`
-   fi
-
+	 testit "TESTING PROTOCOL $p with options $options" ../testprogs/blackbox/test_ldb.sh $p $options
  done
 done
 

Modified: branches/SAMBA_4_0/source/script/tests/test_local.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_local.sh	2007-01-25 10:29:04 UTC (rev 21016)
+++ branches/SAMBA_4_0/source/script/tests/test_local.sh	2007-01-25 12:39:13 UTC (rev 21017)
@@ -26,7 +26,7 @@
 incdir=`dirname $0`
 . $incdir/test_functions.sh
 
-# the local tests doesn't need smbd
+# the local tests don't need smbd
 SMBD_TEST_FIFO=""
 export SMBD_TEST_FIFO
 

Modified: branches/SAMBA_4_0/source/script/tests/tests_all.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/tests_all.sh	2007-01-25 10:29:04 UTC (rev 21016)
+++ branches/SAMBA_4_0/source/script/tests/tests_all.sh	2007-01-25 12:39:13 UTC (rev 21017)
@@ -1,5 +1,4 @@
 #!/bin/sh
- $SRCDIR/script/tests/test_pidl.sh
  $SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD
  $SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD
  $SRCDIR/script/tests/test_nbt.sh $SERVER
@@ -11,5 +10,6 @@
  $SRCDIR/script/tests/test_echo.sh $SERVER $USERNAME $PASSWORD $DOMAIN
  $SRCDIR/script/tests/test_posix.sh //$SERVER/tmp $USERNAME $PASSWORD ""
  $SRCDIR/script/tests/test_local.sh
+ $SRCDIR/script/tests/test_pidl.sh
  $SRCDIR/script/tests/test_blackbox.sh $SERVER $USERNAME $PASSWORD $DOMAIN $PREFIX
  $SRCDIR/script/tests/test_simple.sh //$SERVER/simple $USERNAME $PASSWORD ""

Modified: branches/SAMBA_4_0/testprogs/blackbox/test_cifsdd.sh
===================================================================
--- branches/SAMBA_4_0/testprogs/blackbox/test_cifsdd.sh	2007-01-25 10:29:04 UTC (rev 21016)
+++ branches/SAMBA_4_0/testprogs/blackbox/test_cifsdd.sh	2007-01-25 12:39:13 UTC (rev 21017)
@@ -37,8 +37,6 @@
 	return $status
 }
 
-
-
 runcopy() {
 	message="$1"
 	shift
@@ -48,7 +46,7 @@
 }
 
 compare() {
-    tesit "$1" cmp "$2" "$3"
+    testit "$1" cmp "$2" "$3"
 }
 
 sourcepath=tempfile.src.$$

Added: branches/SAMBA_4_0/testprogs/blackbox/test_ldb.sh
===================================================================
--- branches/SAMBA_4_0/testprogs/blackbox/test_ldb.sh	2007-01-25 10:29:04 UTC (rev 21016)
+++ branches/SAMBA_4_0/testprogs/blackbox/test_ldb.sh	2007-01-25 12:39:13 UTC (rev 21017)
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+p=$1
+shift 1
+options="$*"
+
+check() {
+	name="$1"
+	shift
+	cmdline="$*"
+	echo "test: $name"
+	$cmdline
+	status=$?
+	if [ x$status = x0 ]; then
+		echo "success: $name"
+	else
+		echo "failure: $name"
+		failed=`expr $failed + 1`
+	fi
+	return $status
+}
+
+
+
+check "RootDSE" bin/ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base DUMMY=x dnsHostName highestCommittedUSN || failed=`expr $failed + 1`
+
+echo "Getting defaultNamingContext"
+BASEDN=`bin/ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base DUMMY=x defaultNamingContext | grep defaultNamingContext | awk '{print $2}'`
+echo "BASEDN is $BASEDN"
+
+check "Listing Users" bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER '(objectclass=user)' sAMAccountName || failed=`expr $failed + 1`
+
+check "Listing Groups" bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER '(objectclass=group)' sAMAccountName || failed=`expr $failed + 1`
+
+nentries=`bin/ldbsearch $options -H $p://$SERVER $CONFIGURATION '(|(|(&(!(groupType:1.2.840.113556.1.4.803:=1))(groupType:1.2.840.113556.1.4.803:=2147483648)(groupType:1.2.840.113556.1.4.804:=10))(samAccountType=805306368))(samAccountType=805306369))' sAMAccountName | grep sAMAccountName | wc -l`
+echo "Found $nentries entries"
+if [ $nentries -lt 10 ]; then
+echo "Should have found at least 10 entries"
+failed=`expr $failed + 1`
+fi
+
+echo "Check rootDSE for Controls"
+nentries=`bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER -s base -b "" '(objectclass=*)' | grep -i supportedControl | wc -l`
+if [ $nentries -lt 4 ]; then
+echo "Should have found at least 4 entries"
+failed=`expr $failed + 1`
+fi
+
+echo "Test Paged Results Control"
+nentries=`bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER --controls=paged_results:1:5 '(objectclass=user)' | grep sAMAccountName | wc -l`
+if [ $nentries -lt 1 ]; then
+echo "Paged Results Control test returned 0 items"
+failed=`expr $failed + 1`
+fi
+
+echo "Test Server Sort Control"
+nentries=`bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER --controls=server_sort:1:0:sAMAccountName '(objectclass=user)' | grep sAMAccountName | wc -l`
+if [ $nentries -lt 1 ]; then
+echo "Server Sort Control test returned 0 items"
+failed=`expr $failed + 1`
+fi
+
+echo "Test Extended DN Control"
+nentries=`bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER --controls=extended_dn:1:0 '(objectclass=user)' | grep sAMAccountName | wc -l`
+if [ $nentries -lt 1 ]; then
+echo "Extended DN Control test returned 0 items"
+failed=`expr $failed + 1`
+fi
+
+echo "Test Attribute Scope Query Control"
+nentries=`bin/ldbsearch $options $CONFIGURATION -H $p://$SERVER --controls=asq:1:member -s base -b "CN=Administrators,CN=Builtin,$BASEDN" | grep sAMAccountName | wc -l`
+if [ $nentries -lt 1 ]; then
+echo "Attribute Scope Query test returned 0 items"
+failed=`expr $failed + 1`
+fi
+exit $failed


Property changes on: branches/SAMBA_4_0/testprogs/blackbox/test_ldb.sh
___________________________________________________________________
Name: svn:executable
   + *



More information about the samba-cvs mailing list