[PATCH 2 of 4] solaris: test cases shouldn't use diff -u when no output is expected

Danek Duvall danek.duvall at oracle.com
Mon Aug 26 15:05:31 CDT 2013


Augie Fackler wrote:

> On Mon, Aug 26, 2013 at 10:28:35AM -0700, Danek Duvall wrote:
> > # HG changeset patch
> > # User Danek Duvall <danek.duvall at oracle.com>
> > # Date 1377295468 25200
> > # Node ID bd488d5b5763ef8c4bc7b4a69e4073861e2487a1
> > # Parent  549b0ea402e74559210c95aaf217749965887f22
> > solaris: test cases shouldn't use diff -u when no output is expected
> >
> > When using Solaris diff, the -u option emits "No differences encountered"
> > when the two files are the same, leading to extraneous test failures.  In
> > such cases, we can easily remove the -u option, since that has no output
> > with either Solaris or GNU diff, and we can remove the various mechanisms
> > that have been used to handle the difference.
> >
> > In order to write a test for check-code.py, though, all uses of diff -u
> > need to be eliminated.  The one case where a simple output is expected, we
> > can just cat the two (one-line) files and confirm the output.  In the other
> > cases, we switch to regular diffs, but we need to teach run-tests.py how to
> > handle command output which has lines starting with "> ".
> 
> Can I convince you that this is two patches? One to educate run-tests
> about output starting with > and one to fix uses of `diff -u`?

Sure, why not?  :)

Thanks,
Danek


More information about the Mercurial-devel mailing list