[PATCH] run-tests: fix b68a41420397 for Windows
Martin Geisler
mg at aragost.com
Mon May 9 10:10:01 CDT 2011
Matt Mackall <mpm at selenic.com> writes:
> On Mon, 2011-05-09 at 15:09 +0200, Adrian Buehlmann wrote:
>> # HG changeset patch
>> # User Adrian Buehlmann <adrian at cadifra.com>
>> # Date 1304945704 -7200
>> # Node ID e1d2a92f0e66d979143d27f272b753a7686c3729
>> # Parent abaf5a2982c36fe7e6992ebce6354a103375181f
>> run-tests: fix b68a41420397 for Windows
>>
>> Before b68a41420397 it was at least possible to run things like
>>
>> $ python run-tests.py test-check-code-hg.py
>> WARNING: Did not find prerequisite tool: gunzip.exe
>> .
>> # Ran 1 tests, 0 skipped, 0 failed.
>>
>> on Windows. Since b68a41420397 I now get:
>>
>> $ python run-tests.py test-check-code-hg.py
>> Usage: run-tests.py [options] [tests]
>>
>> run-tests.py: error: --shell must be executable
>>
>> This patch fixes it for me by bypassing the new check that was inserted with
>> b68a41420397.
>>
>> diff --git a/tests/run-tests.py b/tests/run-tests.py
>> --- a/tests/run-tests.py
>> +++ b/tests/run-tests.py
>> @@ -181,7 +181,7 @@
>> options.pure = True
>>
>> if not (os.path.isfile(options.shell) and
>> - os.access(options.shell, os.X_OK)):
>> + os.access(options.shell, os.X_OK) or os.name == 'nt'):
>> parser.error('--shell must be executable')
>
> This whole test is pointless overkill for run-tests. We should just drop
> the whole thing.
Fair enough, I'm all for simplifying things so I'll tear it out.
--
Martin Geisler
aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/
More information about the Mercurial-devel
mailing list