[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Tue Nov 30 17:48:01 MST 2010
The branch, master has been updated
via 0acc93c waf: added a help target for the other waf builds
via 557401b s4-build: added a 'make help' target
via 062378c s4-provision: fixed check for missing msDS-SupportedEncryptionTypes
via 7526171 wintest: make expect calls case insensitive by default
via 1079195 wintest: added --vms option
from 47e8cbe heimdal: fix for w2000 from lha
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0acc93cc2c8baa9a693066835ff1a1ba1e0ed50b
Author: Andrew Tridgell <tridge at samba.org>
Date: Wed Dec 1 09:57:50 2010 +1100
waf: added a help target for the other waf builds
this lets the s3 waf build use "make help"
Autobuild-User: Andrew Tridgell <tridge at samba.org>
Autobuild-Date: Wed Dec 1 01:47:50 CET 2010 on sn-devel-104
commit 557401b68d0d96f8a21037c917cad77c0e6e2a89
Author: Andrew Tridgell <tridge at samba.org>
Date: Wed Dec 1 09:56:29 2010 +1100
s4-build: added a 'make help' target
commit 062378c1b4ba4f199cee6d4368e87f1e0ba820a6
Author: Andrew Tridgell <tridge at samba.org>
Date: Tue Nov 30 13:24:01 2010 +1100
s4-provision: fixed check for missing msDS-SupportedEncryptionTypes
thanks to Jelmer for spotting this
commit 7526171ce596daf008798bd2ab63bb57c08b184a
Author: Andrew Tridgell <tridge at samba.org>
Date: Tue Nov 30 11:55:48 2010 +1100
wintest: make expect calls case insensitive by default
commit 1079195a7652e890d6e683f4f29d0454d72141e6
Author: Andrew Tridgell <tridge at samba.org>
Date: Tue Nov 30 11:54:55 2010 +1100
wintest: added --vms option
this allows you to run tests associated with a specified list of VMs
-----------------------------------------------------------------------
Summary of changes:
buildtools/scripts/Makefile.waf | 7 ++++-
source4/Makefile | 7 ++++-
.../scripting/python/samba/provision/__init__.py | 5 +--
wintest/test-s4-howto.py | 21 ++++++++------
wintest/wintest.py | 29 +++++++++++++++-----
5 files changed, 48 insertions(+), 21 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/scripts/Makefile.waf b/buildtools/scripts/Makefile.waf
index c07f859..716ab93 100644
--- a/buildtools/scripts/Makefile.waf
+++ b/buildtools/scripts/Makefile.waf
@@ -1,6 +1,7 @@
# simple makefile wrapper to run waf
-WAF=WAF_MAKE=1 BUILDTOOLS/bin/waf
+WAF_BINARY=BUILDTOOLS/bin/waf
+WAF=WAF_MAKE=1 $(WAF_BINARY)
all:
$(WAF) build
@@ -14,6 +15,10 @@ uninstall:
test:
$(WAF) test $(TEST_OPTIONS)
+help:
+ @echo NOTE: to run extended waf options use $(WAF_BINARY) or modify your PATH
+ $(WAF) --help
+
testenv:
$(WAF) test --testenv $(TEST_OPTIONS)
diff --git a/source4/Makefile b/source4/Makefile
index 838f0a9..77b3189 100644
--- a/source4/Makefile
+++ b/source4/Makefile
@@ -1,6 +1,7 @@
# simple makefile wrapper to run waf
-WAF=WAF_MAKE=1 ../buildtools/bin/waf
+WAF_BINARY=../buildtools/bin/waf
+WAF=WAF_MAKE=1 $(WAF_BINARY)
all:
$(WAF) build
@@ -14,6 +15,10 @@ uninstall:
test:
$(WAF) test $(TEST_OPTIONS)
+help:
+ @echo NOTE: to run extended waf options use $(WAF_BINARY) or modify your PATH
+ $(WAF) --help
+
subunit-test:
$(WAF) test --filtered-subunit $(TEST_OPTIONS)
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index e184ad8..7f19699 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -1642,10 +1642,9 @@ def provision(setup_dir, logger, session_info, credentials, smbconf=None,
name="msDS-SupportedEncryptionTypes")
samdb.modify(msg)
except ldb.LdbError, (enum, estr):
- if enum == ldb.ERR_NO_SUCH_ATTRIBUTE:
+ if enum != ldb.ERR_NO_SUCH_ATTRIBUTE:
# It might be that this attribute does not exist in this schema
- pass
- raise
+ raise
if serverrole == "domain controller":
secretsdb_setup_dns(secrets_ldb, setup_path, names,
diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py
index 8f57553..185a86d 100755
--- a/wintest/test-s4-howto.py
+++ b/wintest/test-s4-howto.py
@@ -668,30 +668,30 @@ def test_howto(t):
if not t.skip("dyndns"):
test_dyndns(t)
- if t.have_var('WINDOWS7_VM') and not t.skip("windows7"):
+ if t.have_vm('WINDOWS7') and not t.skip("windows7"):
run_winjoin(t, "WINDOWS7")
test_winjoin(t, "WINDOWS7")
- if t.have_var('WINXP_VM') and not t.skip("winxp"):
+ if t.have_vm('WINXP') and not t.skip("winxp"):
run_winjoin(t, "WINXP")
test_winjoin(t, "WINXP")
- if t.have_var('W2K8R2C_VM') and not t.skip("dcpromo_rodc"):
+ if t.have_vm('W2K8R2C') and not t.skip("dcpromo_rodc"):
t.info("Testing w2k8r2 RODC dcpromo")
run_dcpromo_rodc(t, "W2K8R2C")
test_dcpromo_rodc(t, "W2K8R2C")
- if t.have_var('W2K8R2B_VM') and not t.skip("dcpromo_w2k8r2"):
+ if t.have_vm('W2K8R2B') and not t.skip("dcpromo_w2k8r2"):
t.info("Testing w2k8r2 dcpromo")
run_dcpromo(t, "W2K8R2B")
test_dcpromo(t, "W2K8R2B")
- if t.have_var('W2K8B_VM') and not t.skip("dcpromo_w2k8"):
+ if t.have_vm('W2K8B') and not t.skip("dcpromo_w2k8"):
t.info("Testing w2k8 dcpromo")
run_dcpromo(t, "W2K8B")
test_dcpromo(t, "W2K8B")
- if t.have_var('W2K3B_VM') and not t.skip("dcpromo_w2k3"):
+ if t.have_vm('W2K3B') and not t.skip("dcpromo_w2k3"):
t.info("Testing w2k3 dcpromo")
t.info("Changing to 2003 functional level")
provision_s4(t, func_level='2003')
@@ -705,21 +705,21 @@ def test_howto(t):
run_dcpromo(t, "W2K3B")
test_dcpromo(t, "W2K3B")
- if t.have_var('W2K8R2A_VM') and not t.skip("join_w2k8r2"):
+ if t.have_vm('W2K8R2A') and not t.skip("join_w2k8r2"):
join_as_dc(t, "W2K8R2A")
create_shares(t)
start_s4(t)
test_dyndns(t)
test_join_as_dc(t, "W2K8R2A")
- if t.have_var('W2K8R2A_VM') and not t.skip("join_rodc"):
+ if t.have_vm('W2K8R2A') and not t.skip("join_rodc"):
join_as_rodc(t, "W2K8R2A")
create_shares(t)
start_s4(t)
test_dyndns(t)
test_join_as_rodc(t, "W2K8R2A")
- if t.have_var('W2K3A_VM') and not t.skip("join_w2k3"):
+ if t.have_vm('W2K3A') and not t.skip("join_w2k3"):
join_as_dc(t, "W2K3A")
create_shares(t)
start_s4(t)
@@ -741,6 +741,7 @@ if __name__ == '__main__':
parser = optparse.OptionParser("test-howto.py")
parser.add_option("--conf", type='string', default='', help='config file')
parser.add_option("--skip", type='string', default='', help='list of steps to skip (comma separated)')
+ parser.add_option("--vms", type='string', default='', help='list of VMs to use (comma separated)')
parser.add_option("--list", action='store_true', default=False, help='list the available steps')
parser.add_option("--rebase", action='store_true', default=False, help='do a git pull --rebase')
parser.add_option("--clean", action='store_true', default=False, help='clean the tree')
@@ -756,7 +757,9 @@ if __name__ == '__main__':
t = wintest.wintest()
t.load_config(opts.conf)
+
t.set_skip(opts.skip)
+ t.set_vms(opts.vms)
if opts.list:
t.list_steps_mode()
diff --git a/wintest/wintest.py b/wintest/wintest.py
index 67af51a..cc24c0d 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -11,6 +11,7 @@ class wintest():
def __init__(self):
self.vars = {}
self.list_mode = False
+ self.vms = None
os.putenv('PYTHONUNBUFFERED', '1')
def setvar(self, varname, value):
@@ -59,6 +60,10 @@ class wintest():
'''set a list of tests to skip'''
self.skiplist = skiplist.split(',')
+ def set_vms(self, vms):
+ '''set a list of VMs to test'''
+ self.vms = vms.split(',')
+
def skip(self, step):
'''return True if we should skip a step'''
if self.list_mode:
@@ -96,6 +101,13 @@ class wintest():
'''see if a variable has been set'''
return varname in self.vars
+ def have_vm(self, vmname):
+ '''see if a VM should be used'''
+ if not self.have_var(vmname + '_VM'):
+ return False
+ if self.vms is None:
+ return True
+ return vmname in self.vms
def putenv(self, key, value):
'''putenv with substitution'''
@@ -204,23 +216,26 @@ class wintest():
self.info("retrying (retries=%u delay=%u)" % (retries, delay))
raise RuntimeError("Failed to find %s" % contains)
- def pexpect_spawn(self, cmd, timeout=60, crlf=True):
+ def pexpect_spawn(self, cmd, timeout=60, crlf=True, casefold=True):
'''wrapper around pexpect spawn'''
cmd = self.substitute(cmd)
self.info("$ " + cmd)
ret = pexpect.spawn(cmd, logfile=sys.stdout, timeout=timeout)
def sendline_sub(line):
- line = self.substitute(line).replace('\n', '\r\n')
- return ret.old_sendline(line + '\r')
+ line = self.substitute(line)
+ if crlf:
+ line = line.replace('\n', '\r\n') + '\r'
+ return ret.old_sendline(line)
- def expect_sub(line, timeout=ret.timeout):
+ def expect_sub(line, timeout=ret.timeout, casefold=casefold):
line = self.substitute(line)
+ if casefold:
+ line = "(?i)" + line
return ret.old_expect(line, timeout=timeout)
- if crlf:
- ret.old_sendline = ret.sendline
- ret.sendline = sendline_sub
+ ret.old_sendline = ret.sendline
+ ret.sendline = sendline_sub
ret.old_expect = ret.expect
ret.expect = expect_sub
--
Samba Shared Repository
More information about the samba-cvs
mailing list