expected test failures?

Martin Geisler mg at lazybytes.net
Fri Nov 20 13:21:45 CST 2009


Benoit Boissinot <bboissin at gmail.com> writes:

> On Fri, Nov 20, 2009 at 01:56:11PM -0500, Neal Becker wrote:
>> On Friday 20 November 2009, Benoit Boissinot wrote:
>> > On Fri, Nov 20, 2009 at 11:52:37AM -0500, Neal Becker wrote:
>> > > On Friday 20 November 2009, Benoit Boissinot wrote:
>> > > > On Fri, Nov 20, 2009 at 5:01 PM, Neal Becker <ndbecker2 at gmail.com> 
>> wrote:
>> > > No.  Tests fail when run under emacs shell.  Tests passed when run under
>> > > konsole.  Neither has $COLUMN set.  This is rediculous!
>> > 
>> > does the following fixes it?
>> > 
>> > diff --git a/tests/run-tests.py b/tests/run-tests.py
>> > --- a/tests/run-tests.py
>> > +++ b/tests/run-tests.py
>> > @@ -785,6 +785,7 @@
>> >      os.environ['TZ'] = 'GMT'
>> >      os.environ["EMAIL"] = "Foo Bar <foo.bar at example.com>"
>> >      os.environ['CDPATH'] = ''
>> > +    os.environ['COLUMN'] = '80'
>> > 
>> >      global TESTDIR, HGTMP, INST, BINDIR, PYTHONDIR, COVERAGE_FILE
>> >      TESTDIR = os.environ["TESTDIR"] = os.getcwd()
>> 
>> Yes (COLUMNS) fixes it.
>> 
>> Does it have to be so fragile?
>
> It's not fragile, we just need to have fixed settings when testing the
> output (like using LANG=C). But it's good that it adapts to the
> terminal width.
>
> So, was emacs having $COLUMNS set?

Yeah, my Emacs exports the COLUMNS variable too in the shells I get with
"M-x eshell" and "M-x shell". My normals shells like zsh and sh do not.

Would it not be better to run the tests in a new, empty environment?
Then we can set the few variables we care about and otherwise be safe
knowing that there wont be another strange variable that tricks us.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20091120/9d59253b/attachment.pgp>


More information about the Mercurial-devel mailing list