Mercurial > hg
comparison tests/run-tests.py @ 35194:779c6cf2967b
run-tests: avoid calculating _testdir again
Differential Revision: https://phab.mercurial-scm.org/D1574
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 01 Dec 2017 12:28:05 -0800 |
parents | f12747de13ea |
children | 8e72f9152c4d |
comparison
equal
deleted
inserted
replaced
35193:f12747de13ea | 35194:779c6cf2967b |
---|---|
977 (br'([^0-9])%s' % re.escape(self._localip()), br'\1$LOCALIP'), | 977 (br'([^0-9])%s' % re.escape(self._localip()), br'\1$LOCALIP'), |
978 (br'\bHG_TXNID=TXN:[a-f0-9]{40}\b', br'HG_TXNID=TXN:$ID$'), | 978 (br'\bHG_TXNID=TXN:[a-f0-9]{40}\b', br'HG_TXNID=TXN:$ID$'), |
979 ] | 979 ] |
980 r.append((self._escapepath(self._testtmp), b'$TESTTMP')) | 980 r.append((self._escapepath(self._testtmp), b'$TESTTMP')) |
981 | 981 |
982 testdir = os.path.dirname(self.path) | 982 replacementfile = os.path.join(self._testdir, b'common-pattern.py') |
983 replacementfile = os.path.join(testdir, b'common-pattern.py') | |
984 | 983 |
985 if os.path.exists(replacementfile): | 984 if os.path.exists(replacementfile): |
986 data = {} | 985 data = {} |
987 with open(replacementfile, mode='rb') as source: | 986 with open(replacementfile, mode='rb') as source: |
988 # the intermediate 'compile' step help with debugging | 987 # the intermediate 'compile' step help with debugging |