Mercurial > hg
comparison tests/run-tests.py @ 42525:9913fffd744b
py3: make catapult usable from the test runner in py3
Differential Revision: https://phab.mercurial-scm.org/D6577
author | Rodrigo Damazio Bovendorp <rdamazio@google.com> |
---|---|
date | Tue, 25 Jun 2019 19:32:08 -0700 |
parents | 49998d5ba66a |
children | fb84730d1c5a 344a086bb764 |
comparison
equal
deleted
inserted
replaced
42524:f3fa10a5877d | 42525:9913fffd744b |
---|---|
1472 script.append(b'alias hg="%s"\n' % self._hgcommand) | 1472 script.append(b'alias hg="%s"\n' % self._hgcommand) |
1473 if os.getenv('MSYSTEM'): | 1473 if os.getenv('MSYSTEM'): |
1474 script.append(b'alias pwd="pwd -W"\n') | 1474 script.append(b'alias pwd="pwd -W"\n') |
1475 | 1475 |
1476 if hgcatapult and hgcatapult != os.devnull: | 1476 if hgcatapult and hgcatapult != os.devnull: |
1477 if PYTHON3: | |
1478 hgcatapult = hgcatapult.encode('utf8') | |
1479 cataname = self.name.encode('utf8') | |
1480 else: | |
1481 cataname = self.name | |
1482 | |
1477 # Kludge: use a while loop to keep the pipe from getting | 1483 # Kludge: use a while loop to keep the pipe from getting |
1478 # closed by our echo commands. The still-running file gets | 1484 # closed by our echo commands. The still-running file gets |
1479 # reaped at the end of the script, which causes the while | 1485 # reaped at the end of the script, which causes the while |
1480 # loop to exit and closes the pipe. Sigh. | 1486 # loop to exit and closes the pipe. Sigh. |
1481 script.append( | 1487 script.append( |
1488 b'while [ -f "$TESTTMP/.still-running" ]; do sleep 1; done ' | 1494 b'while [ -f "$TESTTMP/.still-running" ]; do sleep 1; done ' |
1489 b'> %(catapult)s &\n' | 1495 b'> %(catapult)s &\n' |
1490 b'HGCATAPULTSESSION=%(session)s ; export HGCATAPULTSESSION\n' | 1496 b'HGCATAPULTSESSION=%(session)s ; export HGCATAPULTSESSION\n' |
1491 b'echo START %(session)s %(name)s >> %(catapult)s\n' | 1497 b'echo START %(session)s %(name)s >> %(catapult)s\n' |
1492 % { | 1498 % { |
1493 'name': self.name, | 1499 b'name': cataname, |
1494 'session': session, | 1500 b'session': session, |
1495 'catapult': hgcatapult, | 1501 b'catapult': hgcatapult, |
1496 } | 1502 } |
1497 ) | 1503 ) |
1498 | 1504 |
1499 if self._case: | 1505 if self._case: |
1500 casestr = b'#'.join(self._case) | 1506 casestr = b'#'.join(self._case) |