Mercurial > hg
diff tests/run-tests.py @ 25728:905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
Before this patch, `run-tests.py` executes `hghave` by the path
relative to `TESTDIR` (= cwd of `run-tests.py` running).
This prevents third party tools for Mercurial from running
`run-tests.py`, which is placed in `tests` of Mercurial source tree,
in `tests` of own source tree. In such cases, `TESTDIR` refers the
latter `tests`, and `hghave` doesn't exist in it.
This is a one of preparations for issue4677.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 03 Jul 2015 06:56:03 +0900 |
parents | 6025cac3d02f |
children | 57dfadc4f46c |
line wrap: on
line diff
--- a/tests/run-tests.py Mon Jul 06 23:23:22 2015 -0400 +++ b/tests/run-tests.py Fri Jul 03 06:56:03 2015 +0900 @@ -902,7 +902,8 @@ def _hghave(self, reqs): # TODO do something smarter when all other uses of hghave are gone. - tdir = self._testdir.replace(b'\\', b'/') + runtestdir = os.path.abspath(os.path.dirname(_bytespath(__file__))) + tdir = runtestdir.replace(b'\\', b'/') proc = Popen4(b'%s -c "%s/hghave %s"' % (self._shell, tdir, b' '.join(reqs)), self._testtmp, 0, self._getenv())