Re: [PATCH] test-lib: avoid full path to store test results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 30, 2012 at 5:28 AM, Jeff King <peff@xxxxxxxx> wrote:
> On Tue, Oct 30, 2012 at 05:12:57AM +0100, Felipe Contreras wrote:
>
>> No reason to use the full path in case this is used externally.
>
> I think it is not just "no reason to", but it is actively wrong to use a
> full path, as we do not take care to "mkdir -p" the intervening path
> components.
>
> However, this never comes up in practice, because all of the test
> scripts assume you are running them from the test directory (i.e.,
> they will fail otherwise because they will not find ./test-lib.sh).
>
> Is this in support of putting remote-hg tests in contrib/? I had
> expected you to just put
>
>   export TEST_DIRECTORY="$(pwd)/../../../t"
>   . "$TEST_DIRECTORY/test-lib.sh"

If there was a single script and we didn't want reports, sure, but
this is not too bad:

TESTS := $(wildcard test*.sh)

export T := $(addprefix $(CURDIR)/,$(TESTS))
export MAKE := $(MAKE) -e
export PATH := $(CURDIR):$(PATH)

test:
	$(MAKE) -C ../../t $@

$(TESTS):
	$(MAKE) -C ../../t $(CURDIR)/$@

.PHONY: $(TESTS)

I just sent the new remote-hg patch series with that.

Cheers.

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]