comparison tests/run-tests.py @ 50932:afb3cccc90f7 stable

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 a4ec7a92d2c5
children 6408777c8fa4
comparison
equal deleted inserted replaced
50931:a4ec7a92d2c5 50932:afb3cccc90f7
3146 self._hgtmp = osenvironb[b'HGTMP'] = os.path.realpath(tmpdir) 3146 self._hgtmp = osenvironb[b'HGTMP'] = os.path.realpath(tmpdir)
3147 3147
3148 self._custom_bin_dir = os.path.join(self._hgtmp, b'custom-bin') 3148 self._custom_bin_dir = os.path.join(self._hgtmp, b'custom-bin')
3149 os.makedirs(self._custom_bin_dir) 3149 os.makedirs(self._custom_bin_dir)
3150 3150
3151 # detect and enforce an alternative way to specify rust extension usage
3152 if (
3153 not (self.options.pure or self.options.rust or self.options.no_rust)
3154 and os.environ.get("HGWITHRUSTEXT") == "cpython"
3155 ):
3156 self.options.rust = True
3157
3151 if self.options.with_hg: 3158 if self.options.with_hg:
3152 self._installdir = None 3159 self._installdir = None
3153 whg = self.options.with_hg 3160 whg = self.options.with_hg
3154 self._bindir = os.path.dirname(os.path.realpath(whg)) 3161 self._bindir = os.path.dirname(os.path.realpath(whg))
3155 assert isinstance(self._bindir, bytes) 3162 assert isinstance(self._bindir, bytes)