Windows Tests

Mads Kiilerich mads at kiilerich.com
Thu May 5 03:40:10 CDT 2011


On 05/05/2011 09:30 AM, Martin Geisler wrote:
> Isaac Jurado<diptongo at gmail.com>  writes:
>
>> On Wed, May 4, 2011 at 2:51 PM, Matt Mackall<mpm at selenic.com>  wrote:
>>>
>>> So we've either got to figure out how to run the existing tests on
>>> Windows unmodified
>>
>> Maybe something like this?  Although a bit outdated:
>>
>>      http://unxutils.sourceforge.net/
>>
>> The MSYS may work too:
>>
>>      http://www.mingw.org/wiki/msys
>>
>> Both alternatives are much lighter than a full Cygwin install.  Even
>> including a bourne-shell.
>
> I think part of the fun is to run the commands using cmd.exe -- this is
> what most users will end up doing, so if the test suite is to have any
> value, we need to test in that environment.

Why do we have to test cmd.exe? It does a lot of strange calls before it 
makes the slightly less strange system calls, and it would be nice to 
leave that out of the equation as much as possible.

The tests should verify that Mercurial does the right thing once it has 
been started, but as long as Mercurial can't see any difference it 
doesn't matter how it was started.

Cygwin modifies system calls to handle and return cygwin paths, but msys 
takes a simpler approach and simply converts posix paths to windows 
paths before passing it to windows.

Cygwin injects DLLs and changes the windows system calls, so that is not 
usable for testing (and hardly feasible to support at all).

But as far as I know msys bash ends up doing exactly the same as 
cmd.exe, it just uses a different parser and shell script language, much 
closer to what we already use.

I suggest giving msys a try.

/Mads
- who realizes that he (and others?) either should take a windows box 
and start hacking on this bike shed or shut up ...


More information about the Mercurial-devel mailing list