[PATCH] run-tests: set HGMODULEPOLICY for --pure

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Apr 14 16:54:00 EDT 2016



On 04/13/2016 08:50 AM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1460555499 0
> #      Wed Apr 13 13:51:39 2016 +0000
> # Node ID ff7d8873976ba6ca9b8cab00f3136aa8bba20521
> # Parent  02be5fc18c0c70c087a9d1ab5ffe5afce926f227
> run-tests: set HGMODULEPOLICY for --pure
>
> Without this, my python 2.6 virtualenv test run with --pure 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

Wait isn't mercurial supposed to pin the version and the module policy 
at install time?

What step of tests is actually complaining and would you be able to says 
why ?

>
> diff --git a/tests/run-tests.py b/tests/run-tests.py
> --- a/tests/run-tests.py
> +++ b/tests/run-tests.py
> @@ -2113,6 +2113,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"
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list