New testing framework
Greg Ward
greg at gerg.ca
Fri Jun 11 14:57:50 CDT 2010
On Fri, Jun 11, 2010 at 12:07 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> It would really love to see a testsuite that's easier to get running on
> Windows than
That's my main goal. (Making it easier to understand and modify the
tests is a close second.) It's working reasonably well; porting the
bfiles tests to hgtest actually found a couple of bfiles bugs.
One annoyance: I have some test code that is obviously Unix-specific, e.g.
if os.name == 'posix':
hgt.announce('bfupdate respects umask')
os.remove('sub/big3')
umask = os.umask(077)
try:
hgt.hg(['bfupdate', 'sub'],
stdout='1 big files updated, 0 removed\n')
finally:
os.umask(umask)
mode = os.stat('sub/big3').st_mode & 0777
hgt.assertequals(0700, mode, 'sub/big3: mode')
When I run this test script on Windows with --debug, it's fine: the
Unix-specific code is silently skipped. But when I let run-tests.py
diff the output, it fails, because it no longer prints the output of
this test.
I think this is just another indication that diffing output is silly
with hgtest. But there's no point modifying run-tests.py to disable
the diff if hgtest is only going to be used by bfiles. I want hgtest
to be useful for Mercurial itself, and that's why I need people to go
bang on it a bit.
Greg
More information about the Mercurial-devel
mailing list