Makefile 1.48 KB
Newer Older
1 2 3 4 5 6 7 8

ifeq ($(TEST_NO_FUSE),1)
go_test=go test -tags nofuse
else
go_test=go test
endif


9
all:
10 11 12
	# no-op. try:
	#   make install
	#   make test
13 14 15 16 17 18 19 20 21

godep:
	go get github.com/tools/godep

# saves/vendors third-party dependencies to Godeps/_workspace
# -r flag rewrites import paths to use the vendored path
# ./... performs operation on all packages in tree
vendor: godep
	godep save -r ./...
22

23
install:
24
	cd cmd/ipfs && go install
25

26
build:
Henry's avatar
Henry committed
27
	cd cmd/ipfs && go build -i
28

Henry's avatar
Henry committed
29 30 31
nofuse:
	cd cmd/ipfs && go install -tags nofuse

32 33 34 35 36
##############################################################
# tests targets

test: test_expensive

37
test_short: build test_go_short test_sharness_short
38

39
test_expensive: build test_go_expensive test_sharness_expensive
40

41 42
test_3node:
	cd test/3nodetest && make
Brian Tiger Chow's avatar
Brian Tiger Chow committed
43

44
test_go_short:
45
	$(go_test) -test.short ./...
46 47

test_go_expensive:
48
	$(go_test) ./...
49

Brian Tiger Chow's avatar
Brian Tiger Chow committed
50
test_go_race:
51
	$(go_test) ./... -race
Brian Tiger Chow's avatar
Brian Tiger Chow committed
52

53
test_sharness_short:
54
	cd test/sharness/ && make
55 56

test_sharness_expensive:
57
	cd test/sharness/ && TEST_EXPENSIVE=1 make
58 59 60 61 62 63

test_all_commits:
	@echo "testing all commits between origin/master..HEAD"
	@echo "WARNING: this will 'git rebase --exec'."
	@test/bin/continueyn
	GIT_EDITOR=true git rebase -i --exec "make test" origin/master
64 65 66 67 68 69 70 71

test_all_commits_travis:
	# these are needed because travis.
	# we don't use this yet because it takes way too long.
	git config --global user.email "nemo@ipfs.io"
	git config --global user.name "IPFS BOT"
	git fetch origin master:master
	GIT_EDITOR=true git rebase -i --exec "make test" master