Patchwork D1843: run-tests: fix regular expression for path test

login
register
mail settings
Submitter phabricator
Date Jan. 11, 2018, 3:05 a.m.
Message ID <differential-rev-PHID-DREV-vllqbgukovceoenuct3m-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26669/
State Superseded
Headers show

Comments

phabricator - Jan. 11, 2018, 3:05 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The previous regexp would match the empty string. This fixes
  a mistake added in https://phab.mercurial-scm.org/rHG964212780daf231a17bc9de9c79c1324372ce468.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1843

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2450,7 +2450,7 @@ 
             # If it looks like our in-repo Rust binary, use the source root.
             # This is a bit hacky. But rhg is still not supported outside the
             # source directory. So until it is, do the simple thing.
-            elif re.search(b'|/rust/target/[^/]+/hg', normbin):
+            elif re.search(b'/rust/target/[^/]+/hg', normbin):
                 self._pythondir = os.path.dirname(self._testdir)
             # Fall back to the legacy behavior.
             else: