mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
land: Add --fail-slowly option.
This commit is contained in:
parent
916904443d
commit
d03ff1c9da
@ -19,8 +19,10 @@ parser.add_option("--passcmd", help="command to run on success", default=None)
|
||||
parser.add_option("--tail", help="show output while running", default=False, action="store_true")
|
||||
parser.add_option("--keeplogs", help="keep logs", default=False, action="store_true")
|
||||
parser.add_option("--nocleanup", help="don't remove test tree", default=False, action="store_true")
|
||||
parser.add_option("", "--fix-whitespace", help="fix whitespace on rebase",
|
||||
parser.add_option("--fix-whitespace", help="fix whitespace on rebase",
|
||||
default=False, action="store_true")
|
||||
parser.add_option("--fail-slowly", help="continue running tests even after one has already failed",
|
||||
action="store_true")
|
||||
|
||||
(opts, args) = parser.parse_args()
|
||||
|
||||
|
@ -23,12 +23,12 @@ tasks = {
|
||||
("make basics", "make basics", "text/plain"),
|
||||
("make", "make -j 4 everything", "text/plain"), # don't use too many processes
|
||||
("install", "make install", "text/plain"),
|
||||
("test", "TDB_NO_FSYNC=1 make subunit-test FAIL_IMMEDIATELY=1", "text/x-subunit") ],
|
||||
("test", "TDB_NO_FSYNC=1 make subunit-test", "text/x-subunit") ],
|
||||
|
||||
"source4" : [ ("configure", "./configure.developer ${PREFIX}", "text/plain"),
|
||||
("make", "make -j", "text/plain"),
|
||||
("install", "make install", "text/plain"),
|
||||
("test", "TDB_NO_FSYNC=1 make subunit-test FAIL_IMMEDIATELY=1", "text/x-subunit") ],
|
||||
("test", "TDB_NO_FSYNC=1 make subunit-test", "text/x-subunit") ],
|
||||
|
||||
"source4/lib/ldb" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
|
||||
("make", "make -j", "text/plain"),
|
||||
@ -89,8 +89,9 @@ def run_cmd(cmd, dir=".", show=None, output=False, checkfail=True):
|
||||
class Builder(object):
|
||||
'''handle build of one directory'''
|
||||
|
||||
def __init__(self, name, sequence):
|
||||
def __init__(self, name, sequence, fail_quickly=False):
|
||||
self.name = name
|
||||
self.fail_quickly = fail_quickly
|
||||
|
||||
if name in ['pass', 'fail', 'retry']:
|
||||
self.dir = "."
|
||||
@ -127,6 +128,8 @@ class Builder(object):
|
||||
(self.stage, self.cmd, self.output_mime_type) = self.sequence[self.next]
|
||||
self.cmd = self.cmd.replace("${PREFIX}", "--prefix=%s" % self.prefix)
|
||||
if self.output_mime_type == "text/x-subunit":
|
||||
if self.fail_quickly:
|
||||
self.cmd += " | %s --fail-immediately" % (os.path.join(os.path.dirname(__file__), "selftest/filter-subunit"))
|
||||
self.cmd += " | %s --immediate" % (os.path.join(os.path.dirname(__file__), "selftest/format-subunit"))
|
||||
print '%s: [%s] Running %s' % (self.name, self.stage, self.cmd)
|
||||
self.proc = Popen(self.cmd, shell=True, cwd="%s/%s" % (self.sdir, self.dir),
|
||||
@ -172,10 +175,10 @@ class BuildList(object):
|
||||
if tasknames == []:
|
||||
tasknames = tasklist
|
||||
for n in tasknames:
|
||||
b = Builder(n, tasks[n])
|
||||
b = Builder(n, tasks[n], not options.fail_slowly)
|
||||
self.tlist.append(b)
|
||||
if options.retry:
|
||||
self.retry = Builder('retry', retry_task)
|
||||
self.retry = Builder('retry', retry_task, not options.fail_slowly)
|
||||
self.need_retry = False
|
||||
|
||||
def kill_kids(self):
|
||||
@ -339,6 +342,8 @@ parser.add_option("", "--always-email", help="always send email, even on success
|
||||
action="store_true")
|
||||
parser.add_option("", "--daemon", help="daemonize after initial setup",
|
||||
action="store_true")
|
||||
parser.add_option("", "--fail-slowly", help="continue running tests even after one has already failed",
|
||||
action="store_true")
|
||||
|
||||
|
||||
def email_failure(status, failed_task, failed_stage, failed_tag, errstr):
|
||||
|
Loading…
x
Reference in New Issue
Block a user