changeset 35600:31acf6619f08

run-tests: fix regular expression for path test The previous regexp would match the empty string. This fixes a mistake added in 964212780daf. Differential Revision: https://phab.mercurial-scm.org/D1843
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 10 Jan 2018 19:04:52 -0800
parents af25237be091
children 98b87b8307e0
files tests/run-tests.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Dec 17 04:31:27 2017 +0100
+++ b/tests/run-tests.py	Wed Jan 10 19:04:52 2018 -0800
@@ -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: