git-lfs/t/Makefile
Taylor Blau 4f2372215f t/Makefile: run setup/shutdown with 'bash -c'
On TravisCI, the default shell is '/bin/sh', and the library scripts in
t require Bash.

Since TravisCI's login shell cannot be changed, run the setup/shutdown
hack using bash -c.
2018-07-13 14:06:29 -05:00

41 lines
915 B
Makefile

RM ?= rm -f
PROVE ?= prove
PROVE_EXTRA_ARGS =
DEFAULT_TEST_TARGET ?= test
GO ?= go
X =
TEST_CMDS =
TEST_CMDS += ../bin/git-credential-lfsnoop$X
TEST_CMDS += ../bin/git-credential-lfstest$X
TEST_CMDS += ../bin/lfs-askpass$X
TEST_CMDS += ../bin/lfs-ssh-echo$X
TEST_CMDS += ../bin/lfs-ssh-proxy-test$X
TEST_CMDS += ../bin/lfstest-count-tests$X
TEST_CMDS += ../bin/lfstest-customadapter$X
TEST_CMDS += ../bin/lfstest-gitserver$X
TEST_CMDS += ../bin/lfstest-standalonecustomadapter$X
TEST_CMDS += ../bin/lfstest-testutils$X
all : $(DEFAULT_TEST_TARGET)
test : $(TEST_CMDS)
$(RM) -r remote test_count{,.lock}
bash -c '. ./testenv.sh && setup'
prove $(PROVE_EXTRA_ARGS) ./t-*.sh
bash -c '. ./testenv.sh && shutdown'
./t-%.sh : $(TEST_CMDS)
$(RM) -r remote test_count{,.lock}
prove -v $(PROVE_EXTRA_ARGS) $@
.PHONY : clean
clean :
$(RM) -r remote
$(RM) $(TEST_CMDS)
../bin/%$X : cmd/%.go
go build -o $@ $^