Patchwork run-tests: set HGMODULEPOLICY for --pure

login
register
mail settings
Submitter timeless@mozdev.org
Date April 13, 2016, 3:50 p.m.
Message ID <ff7d8873976ba6ca9b8c.1460562632@waste.org>
Download mbox | patch
Permalink /patch/14579/
State Accepted
Headers show

Comments

timeless@mozdev.org - April 13, 2016, 3:50 p.m.
# HG changeset patch
# User timeless <timeless@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
Pierre-Yves David - April 14, 2016, 8:54 p.m.
On 04/13/2016 08:50 AM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@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@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
timeless - April 14, 2016, 8:55 p.m.
Pierre-Yves David wrote:
> Wait isn't mercurial supposed to pin the version and the module policy at
> install time?

Sure, but I use --local -- the install time phase takes way too long

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

Pretty much all tests :)
Pierre-Yves David - April 14, 2016, 8:56 p.m.
On 04/14/2016 01:55 PM, timeless wrote:
> Pierre-Yves David wrote:
>> Wait isn't mercurial supposed to pin the version and the module policy at
>> install time?
> Sure, but I use --local -- the install time phase takes way too long

As, that make sense

>
>> What step of tests is actually complaining and would you be able to says why
> Pretty much all tests :)
Pierre-Yves David - April 14, 2016, 9:01 p.m.
(This is pushed)

On 04/14/2016 01:56 PM, Pierre-Yves David wrote:
>
>
> On 04/14/2016 01:55 PM, timeless wrote:
>> Pierre-Yves David wrote:
>>> Wait isn't mercurial supposed to pin the version and the module 
>>> policy at
>>> install time?
>> Sure, but I use --local -- the install time phase takes way too long
>
> As, that make sense
>
>>
>>> What step of tests is actually complaining and would you be able to 
>>> says why
>> Pretty much all tests :)
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

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"