# HG changeset patch # User Pierre-Yves David # Date 1727445236 -7200 # Node ID 7ff35f1290c0f922c6f6d77b1113679346d59f9d # Parent 37a07941050762ea1f04074c231e6c9e8a587fba run-tests: ensure that --no-rust do not use rust Since having a valid value in HGWITHRUSTEXT is enough to trigger the use of rust, we need to unset it before install to be sure. diff -r 37a079410507 -r 7ff35f1290c0 tests/run-tests.py --- a/tests/run-tests.py Tue Sep 17 16:40:24 2024 +0200 +++ b/tests/run-tests.py Fri Sep 27 15:53:56 2024 +0200 @@ -3717,15 +3717,18 @@ vlog("# Performing temporary installation of HG") installerrs = os.path.join(self._hgtmp, b"install.err") compiler = '' + install_env = original_env.copy() if self.options.compiler: compiler = '--compiler ' + self.options.compiler setup_opts = b"" if self.options.pure: setup_opts = b"--pure" + install_env.pop('HGWITHRUSTEXT', None) elif self.options.rust: setup_opts = b"--rust" elif self.options.no_rust: setup_opts = b"--no-rust" + install_env.pop('HGWITHRUSTEXT', None) # Run installer in hg root compiler = _sys2bytes(compiler) @@ -3771,7 +3774,7 @@ makedirs(self._bindir) vlog("# Running", cmd.decode("utf-8")) - if subprocess.call(_bytes2sys(cmd), shell=True, env=original_env) == 0: + if subprocess.call(_bytes2sys(cmd), shell=True, env=install_env) == 0: if not self.options.verbose: try: os.remove(installerrs)