[PATCH 0 of 3] Mercurial test suite on Windows with MSYS

Mads Kiilerich mads at kiilerich.com
Sun Nov 20 18:57:32 CST 2011


Many more general fixes to Mercurial and the test suite has already been pushed
(a few only to crew), but with these MSYS specific patches on top it will now
be possible to run the test suite on Windows with the MSYS unix tools and
Matt's Hackable windows package ... or at lest 66% of it.

I only see one real test failure (test-casecollision-i18n.t) ... plus 4
failures caused by the current need for an updated hackable package that works
with the current default branch.

MSYS differs from cygwin in that non-MSYS applications are run in a normal
native environment without any DLL injection. The conversion between the
different pathname separator conventions will of course remain an issue that
has to be handled somehow. MSYS bash will convert command line parameters and
environment variables from unix single-rooted paths to windows drive-rooted
paths when it invoke external commands. 7 tests has to be skipped because
assumptions colliding with that. Going in the opposite direction, when we use
file paths in shell scripts, we have to avoid '\'. That is done by creating an
alias for pwd.

One of the "big" Mercurial issues that show up is the need for a better way to
control a daemonized 'hg serve' in a cross platform way. Right now all hgweb
tests are skipped.

Many other tests are skipped for various annoying reasons, often only because
of small parts of the test that easily could be skipped ... if it was possible
to skip a part of a test.

This way of running the Mercurial test suite on windows is not perfect. But I
think it is better than nothing, it can be improved, and the perfect solution
will have to be better than this ...

I hope that this - like Matt's Hackable Mercurial - will make it easier for
windows users to contribute to Mercurial. The excuses for not being able to
contribute are now more bad than ever.

/Mads


Some quick notes for getting up and running with MSYS:

Download an installer from
http://sourceforge.net/projects/mingw/files/latest/download - for example
http://downloads.sourceforge.net/project/mingw/Installer/mingw-get-inst/mingw-get-inst-20110802/mingw-get-inst-20110802.exe
.
Select the MSYS Basic System component. (MinGW Developer Toolkit)
Launch terminal with C:\MinGW\msys\1.0\msys.bat

Pro tip: the windows console window is worse than awfull. Instead use:
  mingw-get install msys-rxvt
  C:\MinGW\msys\1.0\msys.bat --rxvt

Fetching Mercurial with MSYS:

mingw-get install msys-wget msys-unzip
wget http://mercurial.selenic.com/release/windows/hackable/mercurial-2.0-hackable.zip
unzip -o mercurial-2.0-hackable.zip
cd hg-2.0/
export PATH="`pwd`:`pwd`/hg-python26:$PATH"
hg pull
hg up default
hg revert hg

Running the test suite:

cd tests
./run-tests.py -l --shell=sh





More information about the Mercurial-devel mailing list