[PATCH] run-tests: fix b68a41420397 for Windows

Adrian Buehlmann adrian at cadifra.com
Mon May 9 08:09:07 CDT 2011


# 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')
 
     if options.with_hg:


More information about the Mercurial-devel mailing list