# HG changeset patch # User Pierre-Yves David # Date 2023-08-30 10:24:12 # Node ID 93cc085653fb84417f8bd261538d633c70d08021 # Parent 8edfd28a01d17ec1458285f807d1362b971ca33a run-tests: detect HGWITHRUSTEXT value Without this, some manual check in tests/test-dirstate.t could get confused by the lack of `rust` in module policy and break the test. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -3147,6 +3147,13 @@ class TestRunner: self._custom_bin_dir = os.path.join(self._hgtmp, b'custom-bin') os.makedirs(self._custom_bin_dir) + # detect and enforce an alternative way to specify rust extension usage + if ( + not (self.options.pure or self.options.rust or self.options.no_rust) + and os.environ.get("HGWITHRUSTEXT") == "cpython" + ): + self.options.rust = True + if self.options.with_hg: self._installdir = None whg = self.options.with_hg