------------------------------------------------------------
revno: 11319
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: SAMBA_4_0
timestamp: Thu 2007-01-25 13:34:31 +0100
message:
  Actually run tests during test phase rather than when generating the recipe.
added:
  testprogs/blackbox/test_ldb.sh test_ldb.sh-20070125123323-4fdjpq40elzgl034-1
modified:
  source/script/tests/test_ldap.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/test_local.sh svn-v2:[EMAIL PROTECTED]
  source/script/tests/tests_all.sh svn-v2:[EMAIL PROTECTED]
  testprogs/blackbox/test_cifsdd.sh svn-v2:[EMAIL PROTECTED]
=== added file 'testprogs/blackbox/test_ldb.sh'
--- a/testprogs/blackbox/test_ldb.sh    1970-01-01 00:00:00 +0000
+++ b/testprogs/blackbox/test_ldb.sh    2007-01-25 12:34:31 +0000
@@ -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

=== modified file 'source/script/tests/test_ldap.sh'
--- a/source/script/tests/test_ldap.sh  2006-09-16 05:06:57 +0000
+++ b/source/script/tests/test_ldap.sh  2007-01-25 12:34:31 +0000
@@ -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 file 'source/script/tests/test_local.sh'
--- a/source/script/tests/test_local.sh 2007-01-23 01:29:17 +0000
+++ b/source/script/tests/test_local.sh 2007-01-25 12:34:31 +0000
@@ -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 file 'source/script/tests/tests_all.sh'
--- a/source/script/tests/tests_all.sh  2007-01-23 10:08:08 +0000
+++ b/source/script/tests/tests_all.sh  2007-01-25 12:34:31 +0000
@@ -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 file 'testprogs/blackbox/test_cifsdd.sh'
--- a/testprogs/blackbox/test_cifsdd.sh 2007-01-14 01:39:34 +0000
+++ b/testprogs/blackbox/test_cifsdd.sh 2007-01-25 12:34:31 +0000
@@ -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.$$

Reply via email to