github.com/zignig/go-ipfs@v0.0.0-20141111235910-c9e5fdf55a52/test/Makefile (about) 1 # Run tests 2 # 3 # Copyright (c) 2014 Christian Couder 4 # MIT Licensed; see the LICENSE file in this repository. 5 # 6 7 T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)) 8 SHARNESS = lib/sharness/sharness.sh 9 RANDOMSRC = Godeps/_workspace/src/github.com/jbenet/go-random/random 10 11 all: clean deps $(T) aggregate 12 13 clean: 14 @echo "*** $@ ***" 15 -rm -r test-results 16 17 $(T): 18 @echo "*** $@ ***" 19 ./$@ 20 21 aggregate: 22 @echo "*** $@ ***" 23 lib/test-aggregate-results.sh 24 25 deps: $(SHARNESS) ipfs random 26 27 $(SHARNESS): 28 @echo "*** installing $@ ***" 29 lib/install-sharness.sh 30 31 # phony to ensure we re-build it every time we run tests 32 ipfs: 33 @echo "*** installing $@ ***" 34 mkdir -p bin 35 cd ../cmd/ipfs && go build 36 cp ../cmd/ipfs/ipfs bin/ipfs 37 38 random: 39 @echo "*** installing $@ ***" 40 mkdir -p bin 41 go build -o bin/random ../$(RANDOMSRC) 42 43 .PHONY: all clean $(T) aggregate ipfs random