D5199: test: fix self._testdir to use ues the right mercurial library during testing
sangeet259 (Sangeet Kumar Mishra)
phabricator at mercurial-scm.org
Sat Nov 3 22:18:31 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG78e5b9d815fa: test: fix self._testdir to use the right mercurial library during testing (authored by sangeet259, committed by ).
CHANGED PRIOR TO COMMIT
https://phab.mercurial-scm.org/D5199?vs=12390&id=12392#toc
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5199?vs=12390&id=12392
REVISION DETAIL
https://phab.mercurial-scm.org/D5199
AFFECTED FILES
tests/run-tests.py
CHANGE DETAILS
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2543,17 +2543,18 @@
os.umask(oldmask)
def _run(self, testdescs):
+ testdir = getcwdb()
self._testdir = osenvironb[b'TESTDIR'] = getcwdb()
# assume all tests in same folder for now
if testdescs:
pathname = os.path.dirname(testdescs[0]['path'])
if pathname:
- osenvironb[b'TESTDIR'] = os.path.join(osenvironb[b'TESTDIR'],
- pathname)
+ testdir = os.path.join(testdir, pathname)
+ self._testdir = osenvironb[b'TESTDIR'] = testdir
if self.options.outputdir:
self._outputdir = canonpath(_bytespath(self.options.outputdir))
else:
- self._outputdir = self._testdir
+ self._outputdir = getcwdb()
if testdescs and pathname:
self._outputdir = os.path.join(self._outputdir, pathname)
previoustimes = {}
@@ -2901,7 +2902,7 @@
testcls = cls
break
- refpath = os.path.join(self._testdir, path)
+ refpath = os.path.join(getcwdb(), path)
tmpdir = os.path.join(self._hgtmp, b'child%d' % count)
# extra keyword parameters. 'case' is used by .t tests
To: sangeet259, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list