Mercurial > hg-stable
changeset 50772:a4ec7a92d2c5 stable
tests: avoid test environment affecting setup.py
In particular [RHG_FALLBACK_EXECUTABLE] is being set prematurely,
before rhg is built, but probably the rest of the env changes don't help,
either.
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Wed, 30 Aug 2023 11:31:05 +0100 |
parents | 5dc7e1907e48 |
children | afb3cccc90f7 |
files | tests/run-tests.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Mon Sep 04 13:33:32 2023 +0100 +++ b/tests/run-tests.py Wed Aug 30 11:31:05 2023 +0100 @@ -165,6 +165,7 @@ return p.decode('utf-8') +original_env = os.environ.copy() osenvironb = getattr(os, 'environb', None) if osenvironb is None: # Windows lacks os.environb, for instance. A proxy over the real thing @@ -3763,7 +3764,7 @@ makedirs(self._bindir) vlog("# Running", cmd.decode("utf-8")) - if subprocess.call(_bytes2sys(cmd), shell=True) == 0: + if subprocess.call(_bytes2sys(cmd), shell=True, env=original_env) == 0: if not self.options.verbose: try: os.remove(installerrs)