[prev in list] [next in list] [prev in thread] [next in thread]
List: mercurial-devel
Subject: Re: [PATCH 3 of 3] run-tests: redefine --with-hg so it takes the 'hg'
From: Greg Ward <greg-hg () gerg ! ca>
Date: 2009-05-31 18:38:57
Message-ID: cd4419280905311138q602360b8kecb596df03b90be2 () mail ! gmail ! com
[Download RAW message or body]
On Sat, May 30, 2009 at 2:27 AM, Matt Mackall <mpm@selenic.com> wrote:
> This is mostly working. I'm having trouble with:
>
> ./run-tests -j 5 --local
[...]
> I've added this patch which sortof works, but I'm not sure if it's
> right. So for now I'm going to take patches one and two and your -v
> patch.
>
> diff -r ad8cfaba1637 tests/run-tests.py
> --- a/tests/run-tests.py Sat May 30 01:14:19 2009 -0500
> +++ b/tests/run-tests.py Sat May 30 01:17:27 2009 -0500
> @@ -34,6 +34,7 @@
> SKIPPED_PREFIX = 'skipped: '
> FAILED_PREFIX = 'hghave check failed: '
> PYTHON = sys.executable
> +PYTHONDIR = ''
I think I've got it at last. The fix is:
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -711,8 +711,13 @@
if options.with_hg:
INST = None
BINDIR = os.path.dirname(os.path.realpath(options.with_hg))
- # do not set PYTHONDIR: any code that uses it only works
- # when we install our own Mercurial library
+
+ # This looks redundant with how Python initializes sys.path from
+ # the location of the script being executed. Needed because the
+ # "hg" specified by --with-hg is not the only Python script
+ # executed in the test suite that needs to import 'mercurial'.
+ PYTHONDIR = BINDIR
else:
INST = os.path.join(HGTMP, "install")
BINDIR = os.environ["BINDIR"] = os.path.join(INST, "bin")
...where the comment is at least as important than the code change. ;-)
Will resend the whole patch in a few minutes, just as soon as I rebase
it on top of latest crew.
Greg
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic