comparison tests/run-tests.py @ 20513:dcd3bebf4786

run-tests: fix heredoctest for out-of-tree extensions heredoctest.py directory must be in python path to use heredoctest (>>>) in out-of-tree extension tests like: $ cd ext/tests $ python /some/hg/install/tests/run-tests.py test-ext.t
author Patrick Mezard <patrick@mezard.eu>
date Sat, 15 Feb 2014 15:28:32 +0100
parents edfbcc3163a8
children 44dcca9be1d5
comparison
equal deleted inserted replaced
20512:659b8d8ddf19 20513:dcd3bebf4786
1262 path = [BINDIR] + os.environ["PATH"].split(os.pathsep) 1262 path = [BINDIR] + os.environ["PATH"].split(os.pathsep)
1263 os.environ["PATH"] = os.pathsep.join(path) 1263 os.environ["PATH"] = os.pathsep.join(path)
1264 1264
1265 # Include TESTDIR in PYTHONPATH so that out-of-tree extensions 1265 # Include TESTDIR in PYTHONPATH so that out-of-tree extensions
1266 # can run .../tests/run-tests.py test-foo where test-foo 1266 # can run .../tests/run-tests.py test-foo where test-foo
1267 # adds an extension to HGRC 1267 # adds an extension to HGRC. Also include run-test.py directory to import
1268 pypath = [PYTHONDIR, TESTDIR] 1268 # modules like heredoctest.
1269 pypath = [PYTHONDIR, TESTDIR, os.path.abspath(os.path.dirname(__file__))]
1269 # We have to augment PYTHONPATH, rather than simply replacing 1270 # We have to augment PYTHONPATH, rather than simply replacing
1270 # it, in case external libraries are only available via current 1271 # it, in case external libraries are only available via current
1271 # PYTHONPATH. (In particular, the Subversion bindings on OS X 1272 # PYTHONPATH. (In particular, the Subversion bindings on OS X
1272 # are in /opt/subversion.) 1273 # are in /opt/subversion.)
1273 oldpypath = os.environ.get(IMPL_PATH) 1274 oldpypath = os.environ.get(IMPL_PATH)