Mercurial > hg
changeset 50888:93cc085653fb
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 30 Aug 2023 12:24:12 +0200 |
parents | 8edfd28a01d1 |
children | 3934d85cf8e9 |
files | tests/run-tests.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Tue Aug 29 22:13:18 2023 +0200 +++ b/tests/run-tests.py Wed Aug 30 12:24:12 2023 +0200 @@ -3147,6 +3147,13 @@ 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