test.sh fails due to PATH issues

Martin Pool mbp at sourcefrog.net
Thu Apr 28 00:35:34 BST 2005


On Wed, 2005-04-27 at 18:59 +1000, Benno wrote:
> So just running test.sh fails if you run it in the source directory.
> 
> To reproduce:
> 
> $ <check out bzr>
> $ mkdir bzr-test.tmp 
> $ ./test.sh
> 
> Now the reson why it fails is that while bzr is in my path, (my path
> contains "."[1]), it fails as soon as you cd into a created directory.
> 
> I really like having the test.sh in the top-level while developing to
> check I don't break things. I'm not sure the best way to solve this. I
> do PATH=`pwd`:$PATH ./test.sh, which works pretty well, but is a bit
> annoying.

The reason for doing it is to allow you to run the current tests against
an older version of bzr, or vice versa.  But it should probably have a
smarter default.

> Not sure the best way to solve this. At one point I replaced bzr with $BZR
> and defined BZR at the top of the file, but this is also crufty.
> 
> On the test.sh side of things, is there a reason not to get the script
> to create bzr-test.tmp?

Not really, just a fear of deleting the wrong files.  It should just
make it.

-- 
Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050428/ab9f5389/attachment.pgp 


More information about the bazaar mailing list