From 8a3db7cbc466bcc19f0c69a74ef9d2eede935c19 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Wed, 18 Mar 2015 01:44:23 -0700 Subject: [PATCH 1/3] testing: nofuse testing (for osx travis) --- Makefile | 18 ++++++++++++++---- core/commands/internal/incfusever/doc.go | 7 +++++++ .../commands/internal/incfusever/incfusever.go | 8 ++------ fuse/readonly/doc.go | 3 +++ fuse/readonly/readonly_unix.go | 2 -- 5 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 core/commands/internal/incfusever/doc.go create mode 100644 fuse/readonly/doc.go diff --git a/Makefile b/Makefile index 98712baf6..68e4b31d0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,15 @@ + +ifeq ($(TEST_NO_FUSE),1) +go_test=go test -tags nofuse +else +go_test=go test +endif + + all: - # no-op + # no-op. try: + # make install + # make test godep: go get github.com/tools/godep @@ -32,13 +42,13 @@ test_3node: cd test/3nodetest && make test_go_short: - go test -test.short ./... + $(go_test) -test.short ./... test_go_expensive: - go test ./... + $(go_test) ./... test_go_race: - go test ./... -race + $(go_test) ./... -race test_sharness_short: cd test/sharness/ && make diff --git a/core/commands/internal/incfusever/doc.go b/core/commands/internal/incfusever/doc.go new file mode 100644 index 000000000..263689ca8 --- /dev/null +++ b/core/commands/internal/incfusever/doc.go @@ -0,0 +1,7 @@ +// Package incfusever is only here to prevent go src tools (like godep) +// from thinking fuseversion is not a required package. Though we do not +// actually use github.com/jbenet/go-fuse-version as a library, we +// _may_ need its binary. We avoid it as much as possible as compiling +// it _requires_ fuse headers. Users must be able to install go-ipfs +// without also installing fuse. +package incfusever diff --git a/core/commands/internal/incfusever/incfusever.go b/core/commands/internal/incfusever/incfusever.go index 9d8a0f17f..6fa386d8f 100644 --- a/core/commands/internal/incfusever/incfusever.go +++ b/core/commands/internal/incfusever/incfusever.go @@ -1,9 +1,5 @@ -// Package incfusever is only here to prevent go src tools (like godep) -// from thinking fuseversion is not a required package. Though we do not -// actually use github.com/jbenet/go-fuse-version as a library, we -// _may_ need its binary. We avoid it as much as possible as compiling -// it _requires_ fuse headers. Users must be able to install go-ipfs -// without also installing fuse. +// +build !nofuse + package incfusever import ( diff --git a/fuse/readonly/doc.go b/fuse/readonly/doc.go new file mode 100644 index 000000000..1a7e779fe --- /dev/null +++ b/fuse/readonly/doc.go @@ -0,0 +1,3 @@ +// package fuse/readonly implements a fuse filesystem to access files +// stored inside of ipfs. +package readonly diff --git a/fuse/readonly/readonly_unix.go b/fuse/readonly/readonly_unix.go index 595426286..2fa75a7f6 100644 --- a/fuse/readonly/readonly_unix.go +++ b/fuse/readonly/readonly_unix.go @@ -1,8 +1,6 @@ // +build linux darwin freebsd // +build !nofuse -// package fuse/readonly implements a fuse filesystem to access files -// stored inside of ipfs. package readonly import ( From 76451fd9ed63d6233a1e2f46d42b1dd006a04382 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Wed, 18 Mar 2015 01:25:44 -0700 Subject: [PATCH 2/3] travis: enable osx --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6f0a5458a..3e5abfab4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,7 @@ +os: + - linux + - osx + language: go go: From 5b4f4328fdd7a0658b44a23d14dd2314f2492b66 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Wed, 18 Mar 2015 02:11:45 -0700 Subject: [PATCH 3/3] 3nodetest: dont fail because of logs --- test/3nodetest/run-test-on-img.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/3nodetest/run-test-on-img.sh b/test/3nodetest/run-test-on-img.sh index 1baf02650..73b1935ac 100755 --- a/test/3nodetest/run-test-on-img.sh +++ b/test/3nodetest/run-test-on-img.sh @@ -25,11 +25,11 @@ fig up --no-color | tee build/fig.log # save the ipfs logs for inspection echo "make save_logs" -make save_logs +make save_logs || true # don't fail # save the ipfs logs for inspection echo "make save_profiling_data" -make save_profiling_data +make save_profiling_data || true # don't fail # fig up won't report the error using an error code, so we grep the # fig.log file to find out whether the call succeeded