test.sh fails due to PATH issues
Benno
benjl at cse.unsw.edu.au
Thu Apr 28 00:39:52 BST 2005
On Thu Apr 28, 2005 at 09:35:34 +1000, Martin Pool wrote:
>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.
Right. I usually don't have the versions I'm testing installed anywhere,
and would prefer just to run them inplace. Would replacing bzr with BZR
and defaulting to bzr in the current directory, and being able to do
BZR=/foo/bar/baz test.sh be suitable?
I've got a patch to do just this if you think that is a good appraoch.
>> 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.
I'll submit a patch.
Cheers,
Benno
More information about the bazaar
mailing list