Show exit codes in unified tests?

Matt Mackall mpm at
Wed Sep 15 19:57:46 CDT 2010

On Thu, 2010-09-16 at 00:30 +0200, Martin Geisler wrote:
> Dirkjan Ochtman <dirkjan at> writes:
> > On Wed, Sep 15, 2010 at 22:14, Matt Mackall <mpm at> wrote:
> >> This only show nonzero exit codes. Turning this on currently breaks 107
> >> tests. And there are probably issues with different exit codes from
> >> non-hg tools on different platforms we'd need to sort out too.
> >
> > I like the idea. Can we come up with a method to alleviate
> > cross-platform incompatibility? I.e. allowing specifying multiple
> > allowed return codes.
> I like it too -- and can we not catch the different error codes using a
> regexp like we do the for the rest of the test? Something like

>   $ command
>   \[(1|42|255)\]

That can be made to work in theory but the current proof of concept is a
bit too kludgey.

> though the escaping makes the square brackets a bad choice. Maybe like
> this instead
>   $ command
>   exit code: (1|42|255)
> which I think reads quite nicely.

Well what makes or breaks this idea is how big the delta is between
Solaris, BSD/OS X, and Linux return codes in our test suite. It may be
nearly negligible, in which case I'd like to keep the [1] style.

Mathematics is the supreme nostalgia of our time.

More information about the Mercurial-devel mailing list