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