[PATCH 2 of 3] run-tests: support multiple cases in .t test

Jun Wu quark at fb.com
Thu May 4 15:34:30 EDT 2017


Excerpts from Gregory Szorc's message of 2017-05-04 00:07:15 -0700:
> I approve of this feature! This should make it vastly easier to test
> configuration variations (especially wire protocol interop).
> 
> I performed a half review and don't see anything obviously bad with this
> patch: it seems reasonable to me. But I don't have run-tests.py paged in,
> so I may have missed something.

It does not handle "-R" correctly. I can fix it in place (which makes this
patch even larger), or send a follow-up with a new test (which may be
cleaner from a small-patch point of view).

> > +        kwds = {}
> > +        for key in ['case']:
> > +            if key in test:
> > +                kwds[key] = test[key]
> >
> 
> Nit: you don't need the for loop here.

This is to avoid duplicating the constant string "key". Maybe it could be
changed to a list comprehension.

> [...]
> 
> Could you please add a test variation running with -v so we have better
> test coverage of cases in test names?

"-v" outputs initialization stuff that is uninteresting to this test and
could be a burden. Since "-v" is not used in test-run-tests.t (maybe for
some reason), I think it's better to not introduce it here.


More information about the Mercurial-devel mailing list