[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Wed Nov 3 11:48:02 MDT 2010


The branch, master has been updated
       via  0baa1fb pydsdb: Import testtools before subunit for those that don't have testtools installed.
       via  4f87f8f filter-subunit: Add --fail-on-empty argument.
      from  f6a1f46 s3: Align nttrans replies the same way Windows does it

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0baa1fb4e494afd11904a3f9b940f2ef265378a4
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Nov 3 17:53:19 2010 +0100

    pydsdb: Import testtools before subunit for those that don't have
    testtools installed.
    
    Also, cleanup some imports.
    
    Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
    Autobuild-Date: Wed Nov  3 17:47:55 UTC 2010 on sn-devel-104

commit 4f87f8f33e5df1d2236bb07e66eb0c5a9cee65b6
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Nov 3 16:30:40 2010 +0100

    filter-subunit: Add --fail-on-empty argument.

-----------------------------------------------------------------------

Summary of changes:
 selftest/filter-subunit                         |   11 +++++++--
 selftest/subunithelper.py                       |    3 ++
 source4/dsdb/tests/python/acl.py                |    2 +-
 source4/dsdb/tests/python/deletetest.py         |    2 +-
 source4/dsdb/tests/python/dsdb_schema_info.py   |    4 ---
 source4/dsdb/tests/python/ldap.py               |   10 ++------
 source4/dsdb/tests/python/ldap_schema.py        |    2 +-
 source4/dsdb/tests/python/passwords.py          |    2 +-
 source4/dsdb/tests/python/sam.py                |   25 +++++++++-------------
 source4/dsdb/tests/python/sec_descriptor.py     |    2 +-
 source4/dsdb/tests/python/urgent_replication.py |    2 +-
 11 files changed, 30 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/filter-subunit b/selftest/filter-subunit
index 872d07f..84b6610 100755
--- a/selftest/filter-subunit
+++ b/selftest/filter-subunit
@@ -21,10 +21,10 @@ parser.add_option("--strip-passed-output", action="store_true",
     help="Whether to strip output from tests that passed")
 parser.add_option("--fail-immediately", action="store_true", 
     help="Whether to stop on the first error", default=False)
-
 parser.add_option("--prefix", type="string",
 	help="Add prefix to all test names")
-
+parser.add_option("--fail-on-empty", default=False,
+	action="store_true", help="Fail if there was no subunit output")
 opts, args = parser.parse_args()
 
 if opts.expected_failures:
@@ -51,7 +51,12 @@ msg_ops = subunithelper.FilterOps(out, opts.prefix, expected_failures,
 				  fail_immediately=opts.fail_immediately)
 
 try:
-	sys.exit(subunithelper.parse_results(msg_ops, statistics, sys.stdin))
+	ret = subunithelper.parse_results(msg_ops, statistics, sys.stdin)
 except subunithelper.ImmediateFail:
 	sys.stdout.flush()
 	sys.exit(1)
+
+if opts.fail_on_empty and not msg_ops.seen_output:
+	sys.exit(1)
+else:
+	sys.exit(ret)
diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py
index b9291b8..5d2d665 100644
--- a/selftest/subunithelper.py
+++ b/selftest/subunithelper.py
@@ -247,6 +247,7 @@ class FilterOps(testtools.testresult.TestResult):
             self.output+=msg
 
     def startTest(self, test):
+        self.seen_output = True
         test = self._add_prefix(test)
         if self.strip_ok_output:
            self.output = ""
@@ -269,6 +270,7 @@ class FilterOps(testtools.testresult.TestResult):
             raise ImmediateFail()
 
     def addSkip(self, test, details=None):
+        self.seen_output = True
         test = self._add_prefix(test)
         self._ops.addSkip(test, details)
         self.output = None
@@ -341,6 +343,7 @@ class FilterOps(testtools.testresult.TestResult):
     def __init__(self, out, prefix=None, expected_failures=None,
                  strip_ok_output=False, fail_immediately=False):
         self._ops = out
+        self.seen_output = False
         self.output = None
         self.prefix = prefix
         if expected_failures is not None:
diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py
index d4c55a4..5d6ce25 100755
--- a/source4/dsdb/tests/python/acl.py
+++ b/source4/dsdb/tests/python/acl.py
@@ -9,8 +9,8 @@ import re
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
diff --git a/source4/dsdb/tests/python/deletetest.py b/source4/dsdb/tests/python/deletetest.py
index 59ebf99..8ed5281 100755
--- a/source4/dsdb/tests/python/deletetest.py
+++ b/source4/dsdb/tests/python/deletetest.py
@@ -7,8 +7,8 @@ import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
diff --git a/source4/dsdb/tests/python/dsdb_schema_info.py b/source4/dsdb/tests/python/dsdb_schema_info.py
index 9c4f7b1..dc82fe0 100755
--- a/source4/dsdb/tests/python/dsdb_schema_info.py
+++ b/source4/dsdb/tests/python/dsdb_schema_info.py
@@ -28,16 +28,12 @@
 import sys
 import time
 import random
-import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
 
-from samba.auth import system_session
 from ldb import SCOPE_BASE, LdbError
-from samba.samdb import SamDB
 
 import samba.tests
 import samba.dcerpc.drsuapi
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index 36c12a2..7057fb4 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -10,8 +10,8 @@ import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
@@ -23,19 +23,15 @@ from ldb import ERR_NOT_ALLOWED_ON_NON_LEAF, ERR_OTHER, ERR_INVALID_DN_SYNTAX
 from ldb import ERR_NO_SUCH_ATTRIBUTE, ERR_INVALID_ATTRIBUTE_SYNTAX
 from ldb import ERR_OBJECT_CLASS_VIOLATION, ERR_NOT_ALLOWED_ON_RDN
 from ldb import ERR_NAMING_VIOLATION, ERR_CONSTRAINT_VIOLATION
-from ldb import ERR_UNDEFINED_ATTRIBUTE_TYPE
 from ldb import Message, MessageElement, Dn
 from ldb import FLAG_MOD_ADD, FLAG_MOD_REPLACE, FLAG_MOD_DELETE
 from samba import Ldb
-from samba.dsdb import (UF_NORMAL_ACCOUNT, UF_INTERDOMAIN_TRUST_ACCOUNT,
-    UF_WORKSTATION_TRUST_ACCOUNT, UF_SERVER_TRUST_ACCOUNT,
-    UF_PARTIAL_SECRETS_ACCOUNT,
+from samba.dsdb import (UF_NORMAL_ACCOUNT,
+    UF_WORKSTATION_TRUST_ACCOUNT,
     UF_PASSWD_NOTREQD, UF_ACCOUNTDISABLE, ATYPE_NORMAL_ACCOUNT,
     ATYPE_WORKSTATION_TRUST, SYSTEM_FLAG_DOMAIN_DISALLOW_MOVE,
     SYSTEM_FLAG_CONFIG_ALLOW_RENAME, SYSTEM_FLAG_CONFIG_ALLOW_MOVE,
     SYSTEM_FLAG_CONFIG_ALLOW_LIMITED_MOVE)
-from samba.dcerpc.security import (DOMAIN_RID_USERS, DOMAIN_RID_DOMAIN_MEMBERS,
-    DOMAIN_RID_DCS, DOMAIN_RID_READONLY_DCS)
 
 from subunit.run import SubunitTestRunner
 import unittest
diff --git a/source4/dsdb/tests/python/ldap_schema.py b/source4/dsdb/tests/python/ldap_schema.py
index 171d6d1..f99a840 100755
--- a/source4/dsdb/tests/python/ldap_schema.py
+++ b/source4/dsdb/tests/python/ldap_schema.py
@@ -10,8 +10,8 @@ import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py
index 314d71b..8f58890 100755
--- a/source4/dsdb/tests/python/passwords.py
+++ b/source4/dsdb/tests/python/passwords.py
@@ -15,8 +15,8 @@ import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py
index 6d5b1a2..039ddf1 100755
--- a/source4/dsdb/tests/python/sam.py
+++ b/source4/dsdb/tests/python/sam.py
@@ -4,33 +4,30 @@
 
 import optparse
 import sys
-import time
-import base64
 import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
 from samba.auth import system_session
-from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE, LdbError
+from ldb import SCOPE_BASE, LdbError
 from ldb import ERR_NO_SUCH_OBJECT, ERR_ATTRIBUTE_OR_VALUE_EXISTS
 from ldb import ERR_ENTRY_ALREADY_EXISTS, ERR_UNWILLING_TO_PERFORM
-from ldb import ERR_NOT_ALLOWED_ON_NON_LEAF, ERR_OTHER, ERR_INVALID_DN_SYNTAX
-from ldb import ERR_NO_SUCH_ATTRIBUTE
-from ldb import ERR_OBJECT_CLASS_VIOLATION, ERR_NOT_ALLOWED_ON_RDN
-from ldb import ERR_NAMING_VIOLATION, ERR_CONSTRAINT_VIOLATION
-from ldb import ERR_UNDEFINED_ATTRIBUTE_TYPE, ERR_INSUFFICIENT_ACCESS_RIGHTS
+from ldb import ERR_OTHER
+from ldb import ERR_OBJECT_CLASS_VIOLATION
+from ldb import ERR_CONSTRAINT_VIOLATION
+from ldb import ERR_UNDEFINED_ATTRIBUTE_TYPE
 from ldb import Message, MessageElement, Dn
 from ldb import FLAG_MOD_ADD, FLAG_MOD_REPLACE, FLAG_MOD_DELETE
 from samba import Ldb
-from samba.dsdb import (UF_NORMAL_ACCOUNT, UF_INTERDOMAIN_TRUST_ACCOUNT,
+from samba.dsdb import (UF_NORMAL_ACCOUNT,
     UF_WORKSTATION_TRUST_ACCOUNT, UF_SERVER_TRUST_ACCOUNT,
     UF_PARTIAL_SECRETS_ACCOUNT, UF_TEMP_DUPLICATE_ACCOUNT,
-    UF_PASSWD_NOTREQD, UF_ACCOUNTDISABLE, ATYPE_NORMAL_ACCOUNT,
+    UF_PASSWD_NOTREQD, ATYPE_NORMAL_ACCOUNT,
     GTYPE_SECURITY_BUILTIN_LOCAL_GROUP, GTYPE_SECURITY_DOMAIN_LOCAL_GROUP,
     GTYPE_SECURITY_GLOBAL_GROUP, GTYPE_SECURITY_UNIVERSAL_GROUP,
     GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP, GTYPE_DISTRIBUTION_GLOBAL_GROUP,
@@ -38,16 +35,14 @@ from samba.dsdb import (UF_NORMAL_ACCOUNT, UF_INTERDOMAIN_TRUST_ACCOUNT,
     ATYPE_SECURITY_GLOBAL_GROUP, ATYPE_SECURITY_UNIVERSAL_GROUP,
     ATYPE_SECURITY_LOCAL_GROUP, ATYPE_DISTRIBUTION_GLOBAL_GROUP,
     ATYPE_DISTRIBUTION_UNIVERSAL_GROUP, ATYPE_DISTRIBUTION_LOCAL_GROUP,
-    ATYPE_WORKSTATION_TRUST, SYSTEM_FLAG_DOMAIN_DISALLOW_MOVE,
-    SYSTEM_FLAG_CONFIG_ALLOW_RENAME, SYSTEM_FLAG_CONFIG_ALLOW_MOVE,
-    SYSTEM_FLAG_CONFIG_ALLOW_LIMITED_MOVE)
+    ATYPE_WORKSTATION_TRUST)
 from samba.dcerpc.security import (DOMAIN_RID_USERS, DOMAIN_RID_DOMAIN_MEMBERS,
     DOMAIN_RID_DCS, DOMAIN_RID_READONLY_DCS)
 
 from subunit.run import SubunitTestRunner
 import unittest
 
-from samba.ndr import ndr_pack, ndr_unpack
+from samba.ndr import ndr_unpack
 from samba.dcerpc import security
 
 parser = optparse.OptionParser("sam.py [options] <host>")
diff --git a/source4/dsdb/tests/python/sec_descriptor.py b/source4/dsdb/tests/python/sec_descriptor.py
index 6748883..55a67dd 100755
--- a/source4/dsdb/tests/python/sec_descriptor.py
+++ b/source4/dsdb/tests/python/sec_descriptor.py
@@ -10,8 +10,8 @@ import random
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 
diff --git a/source4/dsdb/tests/python/urgent_replication.py b/source4/dsdb/tests/python/urgent_replication.py
index 47d43dd..af5caca 100755
--- a/source4/dsdb/tests/python/urgent_replication.py
+++ b/source4/dsdb/tests/python/urgent_replication.py
@@ -7,8 +7,8 @@ import os
 
 sys.path.append("bin/python")
 import samba
-samba.ensure_external_module("subunit", "subunit/python")
 samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import samba.getopt as options
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list