Running the testsuite on Windows 7 x64

Adrian Buehlmann adrian at cadifra.com
Thu Jun 14 16:25:37 CDT 2012


I finally got the complete testsuite running on Windows 7 x64, but only
with the x86 (32-bit) variant of Mercurial so far.

Before, for example, the test-commandserver.py test failed here (as I
already reported before). Now, it passes.

The hg.exe is really needed, I failed to understand that before.

I compiled timless' exemaker clone

  https://bitbucket.org/timeless/exemaker

using the MS C compiler as installed from the Windows SDK (see
HackableMercurial on the wiki).

With an x86 (=32-bit) Python26 in C:\Python, the testsuite passes here
in a MSYS shell using the command:

  $ PATH="/mingw/bin:/bin:/c/python:/c/cygwin/bin"
PYTHONPATH="/c/python/lib:/c/Python/DLLs" ./run-tests.py --local

The part /c/cygwin/bin is needed here because without that, there is
apparently no dd.exe (for example, test-verify.t needs dd).

The C extensions of Mercurial were compiled with

 $ make local

in an MSYS shell, using the MS C compiler.

I *did* have to copy the hg script to hg.py and had to change the first
line to

  #!C:\Windows\SysWOW64\python26.dll

Without that, the hg.exe (copied from the exemaker.exe from the timless
clone) was not able to find the x86 (32-bit) python26.dll, which
apparently happens to have been installed there by the 32-bit Python 2.6
msi installer on my Windows 7 x64.

I complained before about having to copy hg to hg.py, but since the
first line needs to be adapted anyway, coping is probably a good thing.

Running the testsuite with PATH set up like that seems like a good idea
to me (thanks Mads!). This also ensures that the hg.exe I have on PATH
from the TortoiseHg install can't be picked up. Ditto for all the other
tools like p4.exe that were causing troubles here.

This whole thing is not really trivial, but at least it works.





More information about the Mercurial-devel mailing list