# HG changeset patch # User Arseniy Alekseyev # Date 1693391465 -3600 # Node ID a4ec7a92d2c5233feb0aa07fdcb8d687246da2df # Parent 5dc7e1907e48b35ebccafe541d885bf0f146328e 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. diff -r 5dc7e1907e48 -r a4ec7a92d2c5 tests/run-tests.py --- 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)