summaryrefslogtreecommitdiff
path: root/source4/scripting/devel
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2014-11-01 20:09:12 -0700
committerJelmer Vernooij <jelmer@samba.org>2014-11-19 18:30:07 +0100
commit5757c5071e3cf5f207bc9772beffe5c2a7eb22f3 (patch)
tree652517c1630bb453802a3f9e61c1ab48a89dd698 /source4/scripting/devel
parent7f0969d79a45c7ae4c62a319889680bf3117b71c (diff)
downloadsamba-5757c5071e3cf5f207bc9772beffe5c2a7eb22f3.tar.gz
speedtest: Create and run a single testsuite, should easy migration to regulary Python unit tests.
Change-Id: Ib31eb26b8f6094a51cd4985b9ae98d018ae95c2d Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting/devel')
-rwxr-xr-xsource4/scripting/devel/speedtest.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/scripting/devel/speedtest.py b/source4/scripting/devel/speedtest.py
index fed270527a0..84d3760c050 100755
--- a/source4/scripting/devel/speedtest.py
+++ b/source4/scripting/devel/speedtest.py
@@ -35,10 +35,8 @@ samba.ensure_external_module("subunit", "subunit/python")
import samba.getopt as options
-from ldb import (
- SCOPE_BASE, SCOPE_SUBTREE, LdbError, ERR_NO_SUCH_OBJECT,
- ERR_UNWILLING_TO_PERFORM, ERR_INSUFFICIENT_ACCESS_RIGHTS)
-from samba.ndr import ndr_pack, ndr_unpack
+from ldb import SCOPE_BASE, SCOPE_SUBTREE
+from samba.ndr import ndr_unpack
from samba.dcerpc import security
from samba.auth import system_session
@@ -233,9 +231,11 @@ ldb_options = ["modules:paged_searches"]
ldb = SamDB(host, credentials=creds, session_info=system_session(), lp=lp, options=ldb_options)
runner = SubunitTestRunner()
-rc = 0
-if not runner.run(unittest.makeSuite(SpeedTestAddDel)).wasSuccessful():
- rc = 1
-if not runner.run(unittest.makeSuite(AclSearchSpeedTest)).wasSuccessful():
+suite = unittest.TestSuite()
+suite.addTests(unittest.makeSuite(SpeedTestAddDel))
+suite.addTests(unittest.makeSuite(AclSearchSpeedTest))
+if not runner.run(suite).wasSuccessful():
rc = 1
+else:
+ rc = 0
sys.exit(rc)