Running tests on windows

Angel Ezquerra Moreu angel.ezquerra at gmail.com
Wed Mar 21 22:41:58 UTC 2012


On Wed, Mar 21, 2012 at 4:25 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 03/21/2012 04:09 PM, Angel Ezquerra Moreu wrote:
>>
>> I think that hackable mercurial was a very big step forward to make it
>> easier for us windows users to start to contribute. The fact that the
>> test suite cannot be run as-is is yet another obstacle that I wish was
>> not there. Even though thanks to your efforts it is now possible to
>> run part of the test suite on windows, it is not quite as easy as
>> running it on Linux yet.
>
>
> Really?
>
> The test suite _do_ run as-is when you have MSYS. But granted, it requires a
> posix environment with sh and other tools, something that "all" unix systems
> have preinstalled.

That is exactly what I meant, plus the fact that apparently not all
tests run on windows, even on MSYS.

> Many Unix users have had problems running from source (and thus running the
> test suite) because they didn't have a Python development setup and thus
> couldn't build Mercurial from scratch.
>
> I don't see much of a difference.

Well, on Windows you need Python _plus_ a posix environment.

> The necessary MSYS packages are easy to install, but they could probably all
> be bundled in a 'Hackable2' zip. Hint hint ;-)

:-) Let's see if I get it to work first!
Does the MinGW license allow that kind of repackaging?

>> In my opinion there are two things that could make it easier for
>> windows users to contribute to mercurial:
>>
>> 1. Let the test suite run on cygwin, with as little workarounds and
>> custom setup steps as possible.
>
> Why is cygwin better? Is it just because you happen to like it and already
> have it installed?

You are partly right. It would be more convenient for me since I
already use Cygwin. It is also my experience that Cygwin has a greater
user base, so it could be argued that potential Windows hackers are
more likely to have it installed and/or know about it. Sure, this is a
weak reason, since people can install MinGW, but it is yet another
little inconvenience.

> Cygwin is however a different environment that neither is windows nor posix.
> It might be usable for some purposes, but a test run under cygwin doesn't
> prove anything regarding running under "pure" windows.

According to the "MinGW - Cygwin comparison" on Wikipedia
(http://en.wikipedia.org/wiki/MinGW#Comparison_with_Cygwin), Cygwin is
more POSIX compatible than MinGW. In particular:

"Because MinGW is dependent upon Win32 API calls, it cannot provide a
full POSIX API; it is unable to compile some Unix applications that
can be compiled with Cygwin. Specifically, this applies to
applications that require POSIX functionality like fork(), mmap() or
ioctl()[15] and those that expect to be run in a POSIX environment."

>> 2. Make it possible to run TortoiseHg from sources on top of hackable
>> mercurial.
>>
>> I think #2 would be quite important. It would give a natural path for
>> the windows TortoiseHg contributors to contribute to mercurial itself.
>
>
> I am sure that already is possible. The main issue will be to decide if you
> want to use the Python bundled with 'hackable' or some other Python that is
> installed on the system.

It may be possible, but it is not easy. Yet another barrier :-(

> What might be missing is a 'Hackable TortoiseHg' that also includes all the
> python modules TortoiseHg requires and the tortoisehg source.

That would be great!

Anyway, I'm not saying that it is impossible to hack on mercurial from
windows, but it is definitely harder than using Linux.

For example, I just followed the instruction on the HackableMercurial
wiki page and I managed to be able to run the tests. That is great,
but then I tried to run the patchbomb test, to verify a change that I
just did to the patchbomb extension and unfortunatelly that particular
set of tests does not work. That would not have happened if I was
using Linux. That may partly explain why there are less Windows
mercurial hackers.

Cheers,

Angel



More information about the Mercurial-devel mailing list