From f4c2cac599263c1ad452f2c7f6cf40fa9331ec5d Mon Sep 17 00:00:00 2001 From: Idan Kamara Date: Fri, 27 May 2011 17:46:48 +0300 Subject: [PATCH] run-tests: fix --blacklist with jobs > 1 filter blacklisted tests before partitioning them to the children. maintains the 'Skipped...' output but not the 's'. --- tests/run-tests.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/run-tests.py b/tests/run-tests.py index 8f8d96547c..e47d1024b2 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -919,7 +919,11 @@ def runchildren(options, tests): optcopy = dict(options.__dict__) optcopy['jobs'] = 1 + + blacklist = optcopy['blacklist'] or [] del optcopy['blacklist'] + blacklisted = [] + if optcopy['with_hg'] is None: optcopy['with_hg'] = os.path.join(BINDIR, "hg") optcopy.pop('anycoverage', None) @@ -941,7 +945,11 @@ def runchildren(options, tests): for job in jobs: if not tests: break - job.append(tests.pop()) + test = tests.pop() + if test in blacklist: + blacklisted.append(test) + else: + job.append(test) fps = {} for j, job in enumerate(jobs): @@ -979,9 +987,12 @@ def runchildren(options, tests): vlog('pid %d exited, status %d' % (pid, status)) failures |= status print + skipped += len(blacklisted) if not options.noskips: for s in skips: print "Skipped %s: %s" % (s[0], s[1]) + for s in blacklisted: + print "Skipped %s: blacklisted" % s for s in fails: print "Failed %s: %s" % (s[0], s[1])