Submitter | Augie Fackler |
---|---|
Date | June 25, 2018, 1:28 p.m. |
Message ID | <348d58daa074a5395eb4.1529933284@augie-macbookpro2.roam.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/32410/ |
State | Superseded |
Headers | show |
Comments
Looks good to me, though I don't have a NetBSD system to test. :) On Mon, Jun 25, 2018 at 6:28 AM, Augie Fackler <raf@durin42.com> wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1529932907 14400 > # Mon Jun 25 09:21:47 2018 -0400 > # Branch stable > # Node ID 348d58daa074a5395eb483816c74c31190892d5f > # Parent 1322ae04d3d71c9bab8ca6e70c77dfa867421c9b > hghave: don't claim we have `tic` if it's NetBSD's binary (issue5698) > > test-status-color.t fails with different output because of mismatches > between how `tic` behaves from NetBSD's base system and ncurses' > verison (if I understand the bug right). The bug suggested using -V to > avoid the issue, so we'll do that. > > diff --git a/tests/hghave.py b/tests/hghave.py > --- a/tests/hghave.py > +++ b/tests/hghave.py > @@ -545,7 +545,11 @@ def has_tic(): > try: > import curses > curses.COLOR_BLUE > - return matchoutput('test -x "`which tic`"', br'') > + if not matchoutput('test -x "`which tic`"', br''): > + return False > + # We have a tic, but make sure it's not the NetBSD system one > + # which doesn't pass test-status-color.t. > + return not matchoutput('tic -V', br'unknown option') > except ImportError: > return False > >
On Mon, Jun 25, 2018 at 09:28:04AM -0400, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1529932907 14400 > # Mon Jun 25 09:21:47 2018 -0400 > # Branch stable > # Node ID 348d58daa074a5395eb483816c74c31190892d5f > # Parent 1322ae04d3d71c9bab8ca6e70c77dfa867421c9b > hghave: don't claim we have `tic` if it's NetBSD's binary (issue5698) > > test-status-color.t fails with different output because of mismatches > between how `tic` behaves from NetBSD's base system and ncurses' > verison (if I understand the bug right). The bug suggested using -V to > avoid the issue, so we'll do that. I've tried applying the patch to 4.6.1, but the test still fails the same way. The 'tic -V' output on NetBSD goes to stderr (not stdout), could that be the reason? Btw, how do I run a single test manually? Thanks, Thomas
Add the test name to the end (`run-tests.py test-foo.t`) On Mon, Jun 25, 2018, 23:12 Thomas Klausner <tk@giga.or.at> wrote: > On Mon, Jun 25, 2018 at 09:28:04AM -0400, Augie Fackler wrote: > > # HG changeset patch > > # User Augie Fackler <augie@google.com> > > # Date 1529932907 14400 > > # Mon Jun 25 09:21:47 2018 -0400 > > # Branch stable > > # Node ID 348d58daa074a5395eb483816c74c31190892d5f > > # Parent 1322ae04d3d71c9bab8ca6e70c77dfa867421c9b > > hghave: don't claim we have `tic` if it's NetBSD's binary (issue5698) > > > > test-status-color.t fails with different output because of mismatches > > between how `tic` behaves from NetBSD's base system and ncurses' > > verison (if I understand the bug right). The bug suggested using -V to > > avoid the issue, so we'll do that. > > I've tried applying the patch to 4.6.1, but the test still fails the > same way. > > The 'tic -V' output on NetBSD goes to stderr (not stdout), could that > be the reason? > > Btw, how do I run a single test manually? > > Thanks, > Thomas >
Patch
diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -545,7 +545,11 @@ def has_tic(): try: import curses curses.COLOR_BLUE - return matchoutput('test -x "`which tic`"', br'') + if not matchoutput('test -x "`which tic`"', br''): + return False + # We have a tic, but make sure it's not the NetBSD system one + # which doesn't pass test-status-color.t. + return not matchoutput('tic -V', br'unknown option') except ImportError: return False