[PATCH 3 of 3] run-tests: redefine --with-hg so it takes the 'hg' script to run

Greg Ward greg-hg at gerg.ca
Sat May 30 17:01:57 CDT 2009


On Sat, May 30, 2009 at 2:27 AM, Matt Mackall <mpm at selenic.com> wrote:
> This is mostly working. I'm having trouble with:
>
> ./run-tests -j 5 --local

Argh.  Man, this is brittle.  I sure as heck hope I'm improving
run-tests, but it's a bit of a slog.

> 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'm trying a variation on that with None as the default value, on the
theory that it will expose more inappropriate uses.  And it does:
_checkhglib() assumes it can os.path.join() with PYTHONDIR, which of
course crashes when it's None.

Also, I accidentally included a redefinition of os.chdir() that added
logging.  That was a nasty little hack for debugging only, so I'll
take it out and resend when I figure out the right treatment of
PYTHONDIR.

Thanks for the testing and feedback!

Greg



More information about the Mercurial-devel mailing list