[PATCH STABLE] runtests: skip json for blacklisted tests
Durham Goode
durham at fb.com
Thu Jan 21 18:40:43 UTC 2016
# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1453400477 28800
# Thu Jan 21 10:21:17 2016 -0800
# Branch stable
# Node ID 488c9fe7971e7df1304c13504407efc4621f642d
# Parent f96bd7d331c205068691de5ee201d2f9cc405e44
runtests: skip json for blacklisted tests
run-tests.py currently throws a KeyError if a blacklist and json output are
specified, since it tries to lookup a non-existent test name in the times table.
This patch fixes it.
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1727,6 +1727,9 @@ class TextTestRunner(unittest.TextTestRu
('skip', result.skipped)]
for res, testcases in groups:
for tc, __ in testcases:
+ # Skip tests that were blacklisted
+ if not tc.name in timesd:
+ continue
tres = {'result': res,
'time': ('%0.3f' % timesd[tc.name][2]),
'cuser': ('%0.3f' % timesd[tc.name][0]),
More information about the Mercurial-devel
mailing list