1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 22:49:13 +08:00

moved sharness tests to a subdir.

kept bin in place
This commit is contained in:
Juan Batiz-Benet
2015-01-07 07:06:59 -08:00
parent 8307572777
commit cecfa45745
17 changed files with 58 additions and 40 deletions

View File

@ -35,10 +35,10 @@ test_go_expensive:
go test ./... go test ./...
test_sharness_short: test_sharness_short:
cd test/ && make cd test/sharness/ && make
test_sharness_expensive: test_sharness_expensive:
cd test/ && TEST_EXPENSIVE=1 make cd test/sharness/ && TEST_EXPENSIVE=1 make
test_all_commits: test_all_commits:
@echo "testing all commits between origin/master..HEAD" @echo "testing all commits between origin/master..HEAD"

3
test/.gitignore vendored
View File

@ -1,5 +1,2 @@
lib/sharness/
bin/ipfs bin/ipfs
bin/random bin/random
test-results/
trash directory.*.sh/

View File

@ -1,45 +1,25 @@
# Run tests
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
# NOTE: run with TEST_VERBOSE=1 for verbose sharness tests. BINS = bin/random bin/ipfs
IPFS_ROOT = ../
IPFS_CMD = ../cmd/ipfs
RANDOM_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-random
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)) all: deps
SHARNESS = lib/sharness/sharness.sh
RANDOMSRC = Godeps/_workspace/src/github.com/jbenet/go-random/random
all: clean deps $(T) aggregate deps: bins
clean: clean:
@echo "*** $@ ***" rm $(BINS)
-rm -rf test-results
$(T): bins: $(BINS)
@echo "*** $@ ***"
./$@
aggregate: bin/random: $(RANDOM_SRC)/**/*.go
@echo "*** $@ ***" go build -o bin/random $(RANDOM_SRC)/random
lib/test-aggregate-results.sh
deps: $(SHARNESS) ipfs random bin/ipfs: $(IPFS_ROOT)/**/*.go
go build -o bin/ipfs $(IPFS_CMD)
$(SHARNESS): test_sharness:
@echo "*** installing $@ ***" cd sharness && make
lib/install-sharness.sh
# phony to ensure we re-build it every time we run tests .PHONY: all clean
ipfs:
@echo "*** installing $@ ***"
mkdir -p bin
cd ../cmd/ipfs && go build
cp ../cmd/ipfs/ipfs bin/ipfs
random:
@echo "*** installing $@ ***"
mkdir -p bin
go build -o bin/random ../$(RANDOMSRC)
.PHONY: all clean $(T) aggregate ipfs random

3
test/sharness/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
lib/sharness/
test-results/
trash directory.*.sh/

37
test/sharness/Makefile Normal file
View File

@ -0,0 +1,37 @@
# Run tests
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
# NOTE: run with TEST_VERBOSE=1 for verbose sharness tests.
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
BINS = bin/random bin/ipfs
SHARNESS = lib/sharness/sharness.sh
all: clean deps $(T) aggregate
clean:
@echo "*** $@ ***"
-rm -rf test-results
$(T):
@echo "*** $@ ***"
./$@
aggregate:
@echo "*** $@ ***"
lib/test-aggregate-results.sh
deps: $(SHARNESS) $(BINS)
$(SHARNESS):
@echo "*** installing $@ ***"
lib/install-sharness.sh
bin/%:
@echo "*** installing $@ ***"
cd .. && make $@
.PHONY: all clean $(T) aggregate

1
test/sharness/bin Symbolic link
View File

@ -0,0 +1 @@
../bin