[PATCH STABLE] runtests: skip json for blacklisted tests

Laurent Charignon lcharignon at fb.com
Thu Jan 21 13:02:35 CST 2016


I already sent a patch doing almost the same thing (issue5050).

Your patch completely removes the test from the output which is not what my patch is doing, I am not sure which idea makes more sense here.

We should definitely add a test though :)


On 1/21/16, 10:40 AM, "Mercurial-devel on behalf of Durham Goode" <mercurial-devel-bounces at selenic.com on behalf of durham at fb.com> wrote:

># 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]),
>_______________________________________________
>Mercurial-devel mailing list
>Mercurial-devel at selenic.com
>https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list