Differences between revisions 6 and 18 (spanning 12 versions)
Revision 6 as of 2008-02-07 17:21:01
Size: 2101
Editor: abuehl
Comment: +cat
Revision 18 as of 2017-12-01 03:04:07
Size: 3749
Editor: JunWu
Comment: add reference to another windows environment setup discussion
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
see also
[[HackableMercurial#Running_the_test_suite_under_MSYS|Running the test suite under MSYS]]
Line 3: Line 6:
Mercurial test suite is a combination of shell scripts with reference outputs and a few python scripts, unusable on a pure Windows platform. [http://hg.intevation.org/beta/mercurial/pmezard/pysh/ pysh] is a unix shell implementation in python designed to run as many tests as possible. While running almost 90% of the test suite, the implementation suffers of the following limitations: Mercurial test suite is a combination of shell scripts with reference outputs and a few python scripts, unusable on a pure Windows platform. [[http://hg.intevation.org/mercurial/pmezard/pysh/|pysh]] is a unix shell implementation in python designed to run as many tests as possible. While running almost 90% of the test suite, the implementation suffers of the following limitations:
Line 6: Line 9:
 * Program outputs like filenames and system messages are hard to simulate. Current solution is to patch the tests to rewrite the output as expected. Two MQ patch queues are currently maintained on top of "crew" and "crew-stable" repositories.  * Program outputs like filenames and system messages are hard to simulate. Current solution is to patch the tests to rewrite the output as expected. One patch queue is maintained on top of crew repository.
Line 13: Line 16:
1. Setup [http://hg.intevation.org/beta/mercurial/pmezard/pysh/ pysh] and its dependencies according to README instructions. 1. Setup [[http://hg.intevation.org/mercurial/pmezard/pysh/|pysh]] and its dependencies according to README instructions.
 . Note: You need to run pyshyacc.py in the pysh directory before installing pysh. That generates the pyshtables.py file ([[http://selenic.com/pipermail/mercurial-devel/2008-April/006073.html|ref]]).
Line 15: Line 19:
2. Clone target "crew" or "crew-stable" (see CrewRepository). 2. Clone target "crew" (see CrewRepository).
Line 17: Line 21:
3. Clone the related patch queue from [http://hg.intevation.org/beta/mercurial/pmezard/crew-stable-w32.mq/ crew-stable-w32.mq] or [http://hg.intevation.org/beta/mercurial/pmezard/crew-w32.mq/ crew-w32.mq] and apply it. Both queues are tagged with latest applied Mercurial revision. They are likely to apply on children ones as well, tests evolve rather slowly. 3. Clone the related patch queue from [[http://hg.intevation.org/mercurial/pmezard/crew-w32.mq/|crew-w32.mq]] and apply it. Queue revisions changelogs contain the crew revision identifier where they successfully manually applied for the last time. They are likely to apply on children ones as well, tests evolve rather slowly.
Line 19: Line 23:
4. Run tests as usual with "run-tests.py" or using pysh "testhg.py" test runner (will require slight path editing). 4. Run tests as usual with "run-tests.py"
Line 21: Line 25:
Few people actually run this procedure and you are likely to encounter setup issues. Please do not give up ! Do not hesitate to send bug reports or suggestions to the author. This tool has been used for almost a year over several Mercurial releases and has proven quite reliable. Few people actually run this procedure and you are likely to encounter setup issues. Please do not give up! Do not hesitate to send bug reports or suggestions to the author (Patrick Mézard). This tool has been used for almost two year over several Mercurial releases and has proven quite reliable.


== Notes ==
Some relevant mailing list threads:
 * http://selenic.com/pipermail/mercurial-devel/2008-April/006065.html
 * http://selenic.com/pipermail/mercurial-devel/2008-January/004403.html
 * https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-April/096350.html

== Comments ==

=== AdrianBuehlmann 2008-05-01 ===
I was able to run the tests ("python run-tests.py -v") on crew 626cb86a6523 on Windows XP SP2 with Python 2.5.1. At first, the tests ran only up to test-archive and then hung (hg serve not wanting to be killed). I noticed that I had a stale python.exe process. After killing that manually, the tests ran through with the following summary:
{{{
Failed test-convert-git: output changed
Failed test-convert-hg-source: output changed
Failed test-flags: output changed
Failed test-git-export: output changed
Failed test-hgwebdir: output changed
Failed test-imerge: output changed
Failed test-merge-types: output changed and returned error code 1
Failed test-mq: output changed
Failed test-patchbomb: output changed
Failed test-webraw: output changed
# Ran 257 tests, 26 skipped, 10 failed.
}}}

=== PatrickMezard 2010-01-08 ===
If one test hangs this is clearly a bug in the test-suite, so please report them on the usual channels. They are often caused by Mercurial not detecting it is being run in the test suite and should work in non-interactive mode. In this case, adding a -y/--non-interactive flag is usually enough to fix the test.

see also Running the test suite under MSYS

Overview

Mercurial test suite is a combination of shell scripts with reference outputs and a few python scripts, unusable on a pure Windows platform. pysh is a unix shell implementation in python designed to run as many tests as possible. While running almost 90% of the test suite, the implementation suffers of the following limitations:

  • Many utilities are still to be implemented or replaced, which explains why Cygwin is required.
  • Program outputs like filenames and system messages are hard to simulate. Current solution is to patch the tests to rewrite the output as expected. One patch queue is maintained on top of crew repository.
  • Asynchronous lists are supported, but kill sometimes refuses to kill and the test is stuck waiting for a process to complete. This is pretty rare though.
  • A couple of tests just cannot be run on Windows platforms for FIFOs do not exist or unix like permissions are not supported. A mechanism to skip them is yet to be written.

Setup

1. Setup pysh and its dependencies according to README instructions.

  • Note: You need to run pyshyacc.py in the pysh directory before installing pysh. That generates the pyshtables.py file (ref).

2. Clone target "crew" (see CrewRepository).

3. Clone the related patch queue from crew-w32.mq and apply it. Queue revisions changelogs contain the crew revision identifier where they successfully manually applied for the last time. They are likely to apply on children ones as well, tests evolve rather slowly.

4. Run tests as usual with "run-tests.py"

Few people actually run this procedure and you are likely to encounter setup issues. Please do not give up! Do not hesitate to send bug reports or suggestions to the author (Patrick Mézard). This tool has been used for almost two year over several Mercurial releases and has proven quite reliable.

Notes

Some relevant mailing list threads:

Comments

AdrianBuehlmann 2008-05-01

I was able to run the tests ("python run-tests.py -v") on crew 626cb86a6523 on Windows XP SP2 with Python 2.5.1. At first, the tests ran only up to test-archive and then hung (hg serve not wanting to be killed). I noticed that I had a stale python.exe process. After killing that manually, the tests ran through with the following summary:

Failed test-convert-git: output changed
Failed test-convert-hg-source: output changed
Failed test-flags: output changed
Failed test-git-export: output changed
Failed test-hgwebdir: output changed
Failed test-imerge: output changed
Failed test-merge-types: output changed and returned error code 1
Failed test-mq: output changed
Failed test-patchbomb: output changed
Failed test-webraw: output changed
# Ran 257 tests, 26 skipped, 10 failed.

PatrickMezard 2010-01-08

If one test hangs this is clearly a bug in the test-suite, so please report them on the usual channels. They are often caused by Mercurial not detecting it is being run in the test suite and should work in non-interactive mode. In this case, adding a -y/--non-interactive flag is usually enough to fix the test.


CategoryWindows CategoryTesting

WindowsTestingPlan (last edited 2017-12-01 03:04:07 by JunWu)