diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2014-11-01 20:09:12 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2015-03-24 04:51:13 +0100 |
commit | 27c6ebfff4913c9e3855f241ebb24681546d6c5c (patch) | |
tree | 99f35c8c0626992d4dc0bd771aa51eca2feb00fc /source4/scripting | |
parent | b01799aa3ff792b0ab9cb9326f1bcb4bdbbe57c5 (diff) | |
download | samba-27c6ebfff4913c9e3855f241ebb24681546d6c5c.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>
(cherry picked from commit 5757c5071e3cf5f207bc9772beffe5c2a7eb22f3)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11137
Diffstat (limited to 'source4/scripting')
-rwxr-xr-x | source4/scripting/devel/speedtest.py | 16 |
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) |