tests/run-tests.py
changeset 35600 31acf6619f08
parent 35569 964212780daf
child 35751 6d65cef5b038
equal deleted inserted replaced
35599:af25237be091 35600:31acf6619f08
  2448             if re.match(b'#!.*python', initial):
  2448             if re.match(b'#!.*python', initial):
  2449                 self._pythondir = self._bindir
  2449                 self._pythondir = self._bindir
  2450             # If it looks like our in-repo Rust binary, use the source root.
  2450             # If it looks like our in-repo Rust binary, use the source root.
  2451             # This is a bit hacky. But rhg is still not supported outside the
  2451             # This is a bit hacky. But rhg is still not supported outside the
  2452             # source directory. So until it is, do the simple thing.
  2452             # source directory. So until it is, do the simple thing.
  2453             elif re.search(b'|/rust/target/[^/]+/hg', normbin):
  2453             elif re.search(b'/rust/target/[^/]+/hg', normbin):
  2454                 self._pythondir = os.path.dirname(self._testdir)
  2454                 self._pythondir = os.path.dirname(self._testdir)
  2455             # Fall back to the legacy behavior.
  2455             # Fall back to the legacy behavior.
  2456             else:
  2456             else:
  2457                 self._pythondir = self._bindir
  2457                 self._pythondir = self._bindir
  2458 
  2458