run-tests: set HGMODULEPOLICY for --pure
authortimeless <timeless@mozdev.org>
Wed, 13 Apr 2016 13:51:39 +0000
changeset 28905 c969c72d6cbc
parent 28904 80be5dbe6e74
child 28906 ac1bb8ca6d39
run-tests: set HGMODULEPOLICY for --pure Without this, my python 2.6 virtualenv test run with --pure and --local fails with: + ImportError: Python minor version mismatch: The Mercurial extension modules were compiled with Python 2.7.8, but Mercurial is currently using Python with sys.hexversion=33950192: Python 2.6.9 (unknown, Apr 13 2016, 12:40:12) + [GCC 4.9.2 20141101 (Red Hat 4.9.2-1)] + at: ~/hg/py26/bin/python
tests/run-tests.py
--- a/tests/run-tests.py	Thu Apr 14 15:26:18 2016 -0400
+++ b/tests/run-tests.py	Wed Apr 13 13:51:39 2016 +0000
@@ -2115,6 +2115,7 @@
 
         if self.options.pure:
             os.environ["HGTEST_RUN_TESTS_PURE"] = "--pure"
+            os.environ["HGMODULEPOLICY"] = "py"
 
         if self.options.allow_slow_tests:
             os.environ["HGTEST_SLOW"] = "slow"