Show More
@@ -3389,6 +3389,9 b' class TestRunner(object):' | |||
|
3389 | 3389 | if self.options.chg: |
|
3390 | 3390 | assert self._installdir |
|
3391 | 3391 | self._installchg() |
|
3392 | if self.options.rhg: | |
|
3393 | assert self._installdir | |
|
3394 | self._installrhg() | |
|
3392 | 3395 | |
|
3393 | 3396 | log( |
|
3394 | 3397 | 'running %d tests using %d parallel processes' |
@@ -3750,6 +3753,33 b' class TestRunner(object):' | |||
|
3750 | 3753 | sys.stdout.write(out) |
|
3751 | 3754 | sys.exit(1) |
|
3752 | 3755 | |
|
3756 | def _installrhg(self): | |
|
3757 | """Install rhg into the test environment""" | |
|
3758 | vlog('# Performing temporary installation of rhg') | |
|
3759 | assert os.path.dirname(self._bindir) == self._installdir | |
|
3760 | assert self._hgroot, 'must be called after _installhg()' | |
|
3761 | cmd = b'"%(make)s" install-rhg PREFIX="%(prefix)s"' % { | |
|
3762 | b'make': b'make', # TODO: switch by option or environment? | |
|
3763 | b'prefix': self._installdir, | |
|
3764 | } | |
|
3765 | cwd = self._hgroot | |
|
3766 | vlog("# Running", cmd) | |
|
3767 | proc = subprocess.Popen( | |
|
3768 | cmd, | |
|
3769 | shell=True, | |
|
3770 | cwd=cwd, | |
|
3771 | stdin=subprocess.PIPE, | |
|
3772 | stdout=subprocess.PIPE, | |
|
3773 | stderr=subprocess.STDOUT, | |
|
3774 | ) | |
|
3775 | out, _err = proc.communicate() | |
|
3776 | if proc.returncode != 0: | |
|
3777 | if PYTHON3: | |
|
3778 | sys.stdout.buffer.write(out) | |
|
3779 | else: | |
|
3780 | sys.stdout.write(out) | |
|
3781 | sys.exit(1) | |
|
3782 | ||
|
3753 | 3783 | def _outputcoverage(self): |
|
3754 | 3784 | """Produce code coverage output.""" |
|
3755 | 3785 | import coverage |
General Comments 0
You need to be logged in to leave comments.
Login now