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

Brendan Cully brendan at kublai.com
Sat Jun 6 15:46:52 CDT 2009


On Tuesday, 02 June 2009 at 08:25, Greg Ward wrote:
> On Tue, Jun 2, 2009 at 1:03 AM, Brendan Cully <brendan at kublai.com> wrote:
> > On Sunday, 31 May 2009 at 19:21, Greg Ward wrote:
> >> # HG changeset patch
> >> # User Greg Ward <greg-hg at gerg.ca>
> >> # Date 1243797631 14400
> >> # Node ID 122b3986e0a25879af002acb007adffcc42b41b9
> >> # Parent  4700924cb679c4c3611bd8ee0d841d043cea070c
> >> run-tests: redefine --with-hg so it takes the 'hg' script to run.
> >
> > I've just discovered that this breaks out-of-tree tests. For unbundled
> > extensions, it was very nice to be able to do
> >
> > /path/to/hg/tests/run-tests test-myextension
> >
> > I'd love to get this back.
> 
> Ahh, irony.  Part of my motivation for this was to make exactly that
> use case a bit easier.  (I use run-tests.py on hg-fastimport.)  I
> think I pulled it off if you use --with-hg or --local; at any rate
> that works for me.  Can you try that and see how it works.  Definitely
> makes the tests go a bit faster.
> 
> But yeah, running without --with-hg (or --local) fails like this:
> 
> /usr/bin/python: can't open file 'setup.py': [Errno 2] No such file or directory
> 
> Is that what you're seeing?  I just realized this should be
> straightforward to fix: just need to make it a little smarter about
> finding setup.py.

No, I'm seeing this:
% /dev/hg/crew/tests/run-tests.py test-sharedrepo

ERROR: test-sharedrepo output changed and returned error code 255
--- Expected output 
+++ Test output 
@@ -1,11 +1,74 @@
+*** failed to import extension sharedrepo: No module named sharedrepo

...

The top of test-sharedrepo does this:

echo "[extensions]" >> $HGRCPATH
echo "sharedrepo=" >> $HGRCPATH


More information about the Mercurial-devel mailing list