Show More
@@ -3021,7 +3021,8 class TestRunner(object): | |||||
3021 | self._hgtmp = None |
|
3021 | self._hgtmp = None | |
3022 | self._installdir = None |
|
3022 | self._installdir = None | |
3023 | self._bindir = None |
|
3023 | self._bindir = None | |
3024 | self._tmpbindir = None |
|
3024 | # a place for run-tests.py to generate executable it needs | |
|
3025 | self._custom_bin_dir = None | |||
3025 | self._pythondir = None |
|
3026 | self._pythondir = None | |
3026 | # True if we had to infer the pythondir from --with-hg |
|
3027 | # True if we had to infer the pythondir from --with-hg | |
3027 | self._pythondir_inferred = False |
|
3028 | self._pythondir_inferred = False | |
@@ -3112,14 +3113,15 class TestRunner(object): | |||||
3112 |
|
3113 | |||
3113 | self._hgtmp = osenvironb[b'HGTMP'] = os.path.realpath(tmpdir) |
|
3114 | self._hgtmp = osenvironb[b'HGTMP'] = os.path.realpath(tmpdir) | |
3114 |
|
3115 | |||
|
3116 | self._custom_bin_dir = os.path.join(self._hgtmp, b'custom-bin') | |||
|
3117 | os.makedirs(self._custom_bin_dir) | |||
|
3118 | ||||
3115 | if self.options.with_hg: |
|
3119 | if self.options.with_hg: | |
3116 | self._installdir = None |
|
3120 | self._installdir = None | |
3117 | whg = self.options.with_hg |
|
3121 | whg = self.options.with_hg | |
3118 | self._bindir = os.path.dirname(os.path.realpath(whg)) |
|
3122 | self._bindir = os.path.dirname(os.path.realpath(whg)) | |
3119 | assert isinstance(self._bindir, bytes) |
|
3123 | assert isinstance(self._bindir, bytes) | |
3120 | self._hgcommand = os.path.basename(whg) |
|
3124 | self._hgcommand = os.path.basename(whg) | |
3121 | self._tmpbindir = os.path.join(self._hgtmp, b'install', b'bin') |
|
|||
3122 | os.makedirs(self._tmpbindir) |
|
|||
3123 |
|
3125 | |||
3124 | normbin = os.path.normpath(os.path.abspath(whg)) |
|
3126 | normbin = os.path.normpath(os.path.abspath(whg)) | |
3125 | normbin = normbin.replace(_sys2bytes(os.sep), b'/') |
|
3127 | normbin = normbin.replace(_sys2bytes(os.sep), b'/') | |
@@ -3147,7 +3149,6 class TestRunner(object): | |||||
3147 | self._installdir = os.path.join(self._hgtmp, b"install") |
|
3149 | self._installdir = os.path.join(self._hgtmp, b"install") | |
3148 | self._bindir = os.path.join(self._installdir, b"bin") |
|
3150 | self._bindir = os.path.join(self._installdir, b"bin") | |
3149 | self._hgcommand = b'hg' |
|
3151 | self._hgcommand = b'hg' | |
3150 | self._tmpbindir = self._bindir |
|
|||
3151 | self._pythondir = os.path.join(self._installdir, b"lib", b"python") |
|
3152 | self._pythondir = os.path.join(self._installdir, b"lib", b"python") | |
3152 |
|
3153 | |||
3153 | # Force the use of hg.exe instead of relying on MSYS to recognize hg is |
|
3154 | # Force the use of hg.exe instead of relying on MSYS to recognize hg is | |
@@ -3210,8 +3211,7 class TestRunner(object): | |||||
3210 | path.insert(1, rhgbindir) |
|
3211 | path.insert(1, rhgbindir) | |
3211 | if self._testdir != runtestdir: |
|
3212 | if self._testdir != runtestdir: | |
3212 | path = [self._testdir] + path |
|
3213 | path = [self._testdir] + path | |
3213 | if self._tmpbindir != self._bindir: |
|
3214 | path = [self._custom_bin_dir] + path | |
3214 | path = [self._tmpbindir] + path |
|
|||
3215 | osenvironb[b"PATH"] = sepb.join(path) |
|
3215 | osenvironb[b"PATH"] = sepb.join(path) | |
3216 |
|
3216 | |||
3217 | # Include TESTDIR in PYTHONPATH so that out-of-tree extensions |
|
3217 | # Include TESTDIR in PYTHONPATH so that out-of-tree extensions | |
@@ -3554,7 +3554,7 class TestRunner(object): | |||||
3554 | msg %= sysexecutable |
|
3554 | msg %= sysexecutable | |
3555 | vlog(msg) |
|
3555 | vlog(msg) | |
3556 | for pyexename in pyexe_names: |
|
3556 | for pyexename in pyexe_names: | |
3557 |
mypython = os.path.join(self._ |
|
3557 | mypython = os.path.join(self._custom_bin_dir, pyexename) | |
3558 | try: |
|
3558 | try: | |
3559 | if os.readlink(mypython) == sysexecutable: |
|
3559 | if os.readlink(mypython) == sysexecutable: | |
3560 | continue |
|
3560 | continue |
General Comments 0
You need to be logged in to leave comments.
Login now