Patchwork [3,of,3,stable] tests: diff -r on Solaris emits "Common subdirectories:"

login
register
mail settings
Submitter Danek Duvall
Date July 20, 2015, 10:46 p.m.
Message ID <8adc0c228606715c7692.1437432412@smelly.us.oracle.com>
Download mbox | patch
Permalink /patch/10047/
State Accepted
Commit 1b449b012073cfad0b451c7650808f4255da91e1
Headers show

Comments

Danek Duvall - July 20, 2015, 10:46 p.m.
# HG changeset patch
# User Danek Duvall <danek.duvall@oracle.com>
# Date 1437432159 25200
#      Mon Jul 20 15:42:39 2015 -0700
# Branch stable
# Node ID 8adc0c228606715c7692d9e641efcac272256405
# Parent  f578f809c667df19e54882cb5f535522d351ac2e
tests: diff -r on Solaris emits "Common subdirectories:"

When using the -r option to Solaris diff, any directores that compare
identically are mentioned in the output.  We don't really care about these
directories for the purposes of this test, so ignore them.
Sean Farley - July 21, 2015, 5:34 p.m.
danek.duvall@oracle.com writes:

> # HG changeset patch
> # User Danek Duvall <danek.duvall@oracle.com>
> # Date 1437432159 25200
> #      Mon Jul 20 15:42:39 2015 -0700
> # Branch stable
> # Node ID 8adc0c228606715c7692d9e641efcac272256405
> # Parent  f578f809c667df19e54882cb5f535522d351ac2e
> tests: diff -r on Solaris emits "Common subdirectories:"
>
> When using the -r option to Solaris diff, any directores that compare
> identically are mentioned in the output.  We don't really care about these
> directories for the purposes of this test, so ignore them.

These look pretty straight-forward to me but I have not actually run the tests.
Matt Mackall - July 21, 2015, 9:21 p.m.
On Mon, 2015-07-20 at 15:46 -0700, danek.duvall@oracle.com wrote:
> # HG changeset patch
> # User Danek Duvall <danek.duvall@oracle.com>
> # Date 1437432159 25200
> #      Mon Jul 20 15:42:39 2015 -0700
> # Branch stable
> # Node ID 8adc0c228606715c7692d9e641efcac272256405
> # Parent  f578f809c667df19e54882cb5f535522d351ac2e
> tests: diff -r on Solaris emits "Common subdirectories:"

These are queued for stable, thanks.
Augie Fackler - July 21, 2015, 10:04 p.m.
On Tue, Jul 21, 2015 at 10:34:48AM -0700, Sean Farley wrote:
>
> danek.duvall@oracle.com writes:
>
> > # HG changeset patch
> > # User Danek Duvall <danek.duvall@oracle.com>
> > # Date 1437432159 25200
> > #      Mon Jul 20 15:42:39 2015 -0700
> > # Branch stable
> > # Node ID 8adc0c228606715c7692d9e641efcac272256405
> > # Parent  f578f809c667df19e54882cb5f535522d351ac2e
> > tests: diff -r on Solaris emits "Common subdirectories:"
> >
> > When using the -r option to Solaris diff, any directores that compare
> > identically are mentioned in the output.  We don't really care about these
> > directories for the purposes of this test, so ignore them.
>
> These look pretty straight-forward to me but I have not actually run the tests.

These also look good to me. I'm kind of bummed about having to use
egrep, but I think that's probably life on Solaris...

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
Danek Duvall - July 21, 2015, 10:18 p.m.
Augie Fackler wrote:

> On Tue, Jul 21, 2015 at 10:34:48AM -0700, Sean Farley wrote:
> >
> > danek.duvall@oracle.com writes:
> >
> > > # HG changeset patch
> > > # User Danek Duvall <danek.duvall@oracle.com>
> > > # Date 1437432159 25200
> > > #      Mon Jul 20 15:42:39 2015 -0700
> > > # Branch stable
> > > # Node ID 8adc0c228606715c7692d9e641efcac272256405
> > > # Parent  f578f809c667df19e54882cb5f535522d351ac2e
> > > tests: diff -r on Solaris emits "Common subdirectories:"
> > >
> > > When using the -r option to Solaris diff, any directores that compare
> > > identically are mentioned in the output.  We don't really care about these
> > > directories for the purposes of this test, so ignore them.
> >
> > These look pretty straight-forward to me but I have not actually run the tests.
> 
> These also look good to me. I'm kind of bummed about having to use
> egrep, but I think that's probably life on Solaris...

To some extent, yes.  For the ones where there's really no decent
cross-platform solution, I just create a patch for our build and try not to
bother you guys with it.

There's a specific behavior of GNU tail, for instance, used in
test-convert-hg-sink, that Solaris tail doesn't have, but a) there's
already an enhancement request filed for that and b) there's no good
workaround, so I just make the test use gtail.

Or extdiff, which assumes that "diff" understands the -N flag.  There's no
good way of reworking that, so I have it simply run "gdiff" instead.

Danek

Patch

diff --git a/tests/test-subrepo-deep-nested-change.t b/tests/test-subrepo-deep-nested-change.t
--- a/tests/test-subrepo-deep-nested-change.t
+++ b/tests/test-subrepo-deep-nested-change.t
@@ -172,7 +172,7 @@  Test relative path printing + subrepos
 Archive wdir() with subrepos
   $ hg rm main
   $ hg archive -S -r 'wdir()' ../wdir
-  $ diff -r . ../wdir | grep -v '\.hg$'
+  $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:'
   Only in ../wdir: .hg_archival.txt
 
   $ find ../wdir -type f | sort
@@ -524,7 +524,7 @@  largefile and a normal file.  Then a lar
   $ hg add sub1/sub2
 
   $ hg archive -S -r 'wdir()' ../wdir2
-  $ diff -r . ../wdir2 | grep -v '\.hg$'
+  $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:'
   Only in ../wdir2: .hg_archival.txt
   Only in .: .hglf
   Only in .: foo
@@ -563,7 +563,7 @@  Test 'wdir()' modified file archiving wi
   $ echo 'mod' > large.bin
   $ echo 'mod' > sub1/sub2/large.dat
   $ hg archive -S -r 'wdir()' ../wdir3
-  $ diff -r . ../wdir3 | grep -v '\.hg$'
+  $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories'
   Only in ../wdir3: .hg_archival.txt
   Only in .: .hglf
   Only in .: foo