Testsuite with x64 Mercurial on Windows

Adrian Buehlmann adrian at cadifra.com
Tue Jun 19 01:23:47 CDT 2012


On 2012-06-19 04:19, Matt Harbison wrote:
> Adrian Buehlmann <adrian <at> cadifra.com> writes:
> 
>>
>> Q: Is anyone running the testsuite with x64 builds of Mercurial on Windows?
>>
> 
> I haven't been (I've been pushing it to Linux inside a VM for more test
> coverage), but I have Win7 x64 if you need me to run something, as long as I can
> set it up in a way that doesn't interfere with my hg and thg source installs.

Thanks, I do have Windows 7 x64 here. However, it would be definitely
fantastic having more people trying to run the tests!

I assume you agree to use the MS C compiler (due to the fact that you
mention thg)? If you don't have it, you can install it with the Windows
SDK, as explained on the HackableMercurial wiki page. The only
additional thing you then need is installing MSYS (see the
HackableMercurial wiki page as well) and exemaker.exe. I compiled my
exemaker.exe (or hg.exe) from https://bitbucket.org/timeless/exemaker
using the MS C compiler. I've just uploaded it to
https://bitbucket.org/abuehl/downloads/downloads/hg-x86-385eaa517487.exe
in case you want to try it.

Compiling Mercurial's C files with the MS C compiler is as simple as
doing (in MSYS shell):

  $ make local

in the root dir of a clone of the mercurial source repo. For that, you
need Python installed and on the path (I currently use 2.7.3, note that
the python msi installers don't set the PATH). Entering "python" in MSYS
should give you the python prompt:

  $ python
  Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit
(Intel)] on win32
  Type "help", "copyright", "credits" or "license" for more information.
  >>>

I have a Windows 7 symbolic link C:\Python here, which points to
C:\Python27_x86, where I have the x86 Python. I can switch the symlink
to Python27_x64, where I have the x64 2.7.3 Python (both installed from
the official msi installers provided by the Python folks).

Depending on what python is on path, 'make local' will either compile
the mercurial C files for x86 or x64.

To run the testsuite, you need to copy the 'hg' python script in the
root dir of the to-be-tested clone of mercurial to hg.py and edit the
first line to

  #!C:\Windows\system32\python27.dll

Then in MSYS shell:

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

The cygwin thing is currently required here for those tests that need
dd.exe (e.g. test-verify.t). I happended to have cycgwin installed here,
which has dd.exe, but otherwise cygwin is not needed for running the
testsuite (I should get rid of that dependency, haven't yet figured out
how to get dd.exe from elsewhere).

Getting the testsuite to run for x64 is on my TODO. I think the blocker
is, that we need a x64 version of exemaker.exe (or the one renamed to
hg.exe). As is, the testsuite depends on exemaker.


More information about the Mercurial-devel mailing list