>From c80f5eeb59c4dc5931ebd84b3fd4483a90cce34a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 17 Feb 2014 09:15:30 +0100 Subject: [PATCH 1/5] script/autobuild: use --force-rebase option This makes sure the current user will be the committer. Signed-off-by: Stefan Metzmacher --- script/autobuild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/autobuild.py b/script/autobuild.py index 4fd6ee4..afd8d3d 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -413,11 +413,11 @@ def rebase_tree(rebase_url, rebase_branch = "master"): show=True, dir=test_master) run_cmd("git fetch %s" % rebase_remote, show=True, dir=test_master) if options.fix_whitespace: - run_cmd("git rebase --whitespace=fix %s/%s" % + run_cmd("git rebase --force-rebase --whitespace=fix %s/%s" % (rebase_remote, rebase_branch), show=True, dir=test_master) else: - run_cmd("git rebase %s/%s" % + run_cmd("git rebase --force-rebase %s/%s" % (rebase_remote, rebase_branch), show=True, dir=test_master) diff = run_cmd("git --no-pager diff HEAD %s/%s" % -- 1.7.9.5 >From 59ee1d0a0b59e682def049c8e4cffb335f06ac3f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 12 Mar 2014 15:12:42 +0100 Subject: [PATCH 2/5] selftest/subunithelper.py: correctly handle unexpected success in FilterOps Signed-off-by: Stefan Metzmacher --- selftest/subunithelper.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py index 057e139..8b10016 100644 --- a/selftest/subunithelper.py +++ b/selftest/subunithelper.py @@ -301,8 +301,14 @@ class FilterOps(testtools.testresult.TestResult): def addUnexpectedSuccess(self, test, details=None): test = self._add_prefix(test) + self.uxsuccess_added+=1 + self.total_uxsuccess+=1 self._ops.addUnexpectedSuccess(test, details) + if self.output: + self._ops.output_msg(self.output) self.output = None + if self.fail_immediately: + raise ImmediateFail() def addFailure(self, test, details=None): test = self._add_prefix(test) @@ -362,12 +368,18 @@ class FilterOps(testtools.testresult.TestResult): if self.xfail_added > 0: xfail = True - if self.fail_added > 0 or self.error_added > 0: + if self.fail_added > 0 or self.error_added > 0 or self.uxsuccess_added > 0: xfail = False if xfail and result in ("fail", "failure"): result = "xfail" + if self.uxsuccess_added > 0 and result != "uxsuccess": + result = "uxsuccess" + if reason is None: + reason = "Subunit/Filter Reason" + reason += "\n uxsuccess[%d]" % self.uxsuccess_added + if self.fail_added > 0 and result != "failure": result = "failure" if reason is None: -- 1.7.9.5 >From 92a70a5467f169eed2dfe6989a56be6c56a077b9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 12 Mar 2014 15:12:42 +0100 Subject: [PATCH 3/5] selftest/subunithelper.py: correctly handle fail_immediately in end_testsuite of FilterOps This way --fail-immediately also works if a command segfaults. Signed-off-by: Stefan Metzmacher --- selftest/subunithelper.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py index 8b10016..3f54d5a 100644 --- a/selftest/subunithelper.py +++ b/selftest/subunithelper.py @@ -393,6 +393,12 @@ class FilterOps(testtools.testresult.TestResult): reason += "\n errors[%d]" % self.error_added self._ops.end_testsuite(name, result, reason) + if result not in ("success", "xfail"): + if self.output: + self._ops.output_msg(self.output) + if self.fail_immediately: + raise ImmediateFail() + self.output = None def __init__(self, out, prefix=None, suffix=None, expected_failures=None, strip_ok_output=False, fail_immediately=False, -- 1.7.9.5 >From bcf6eb7d24f179aa35de9c6db28e6c8b419de06f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 12 Mar 2014 15:12:42 +0100 Subject: [PATCH 4/5] selftest/subunithelper.py: correctly pass testsuite-uxsuccess to end_testsuite() Signed-off-by: Stefan Metzmacher --- selftest/subunithelper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py index 3f54d5a..6f1fdce 100644 --- a/selftest/subunithelper.py +++ b/selftest/subunithelper.py @@ -24,7 +24,7 @@ import subunit.iso8601 import testtools from testtools import content, content_type -VALID_RESULTS = ['success', 'successful', 'failure', 'fail', 'skip', 'knownfail', 'error', 'xfail', 'skip-testsuite', 'testsuite-failure', 'testsuite-xfail', 'testsuite-success', 'testsuite-error', 'uxsuccess'] +VALID_RESULTS = ['success', 'successful', 'failure', 'fail', 'skip', 'knownfail', 'error', 'xfail', 'skip-testsuite', 'testsuite-failure', 'testsuite-xfail', 'testsuite-success', 'testsuite-error', 'uxsuccess', 'testsuite-uxsuccess'] class TestsuiteEnabledTestResult(testtools.testresult.TestResult): @@ -158,6 +158,9 @@ def parse_results(msg_ops, statistics, fh): exitcode = 1 elif result == "testsuite-xfail": msg_ops.end_testsuite(testname, "xfail", reason) + elif result == "testsuite-uxsuccess": + msg_ops.end_testsuite(testname, "uxsuccess", reason) + exitcode = 1 elif result == "testsuite-error": msg_ops.end_testsuite(testname, "error", reason) exitcode = 1 -- 1.7.9.5 >From 1d3b92b0dc53cb3eb1f0038f50f1f9a72bcb4885 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 11 Mar 2014 12:53:14 +0100 Subject: [PATCH 5/5] docs-xml:wscript_build: avoid always=True for the smbdotconf/parameters.all.xml This has well defined dependecies. Signed-off-by: Stefan Metzmacher --- docs-xml/wscript_build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build index d59d4b5..5d0e85b 100644 --- a/docs-xml/wscript_build +++ b/docs-xml/wscript_build @@ -120,8 +120,7 @@ parameter_all = 'smbdotconf/parameters.all.xml' bld.SAMBA_GENERATOR(parameter_all, source=articles, target=parameter_all, - rule=smbdotconf_generate_parameter_list, - always=True) + rule=smbdotconf_generate_parameter_list) def SMBDOTCONF_MANPAGE(bld, target): ''' assemble and build smb.conf.5 manual page''' -- 1.7.9.5