diff --git a/.travis.yml b/.travis.yml index cfc286e6e..22467a3c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,7 +72,7 @@ matrix: - source scripts/install-awscli.sh - go install -race storj.io/storj/cmd/{storj-sdk,bootstrap,satellite,storagenode,uplink,gateway,certificates,captplanet} script: - - set -o pipefail && make test-storj-sdk |& go run scripts/fail-on-race.go + - set -o pipefail && make test-sdk |& go run scripts/fail-on-race.go - set -o pipefail && make test-certificate-signing |& go run scripts/fail-on-race.go - set -o pipefail && make test-captplanet |& go run scripts/fail-on-race.go diff --git a/Makefile b/Makefile index 7b7ab316b..ab9cd5fe4 100644 --- a/Makefile +++ b/Makefile @@ -65,6 +65,13 @@ proto: ## Rebuild protobuf files go run scripts/protobuf.go install go run scripts/protobuf.go generate +##@ SDK + +.PHONY: install-sdk +install-sdk: ## install storj-sdk + @echo "Running ${@}" + @go install -race -v storj.io/storj/cmd/storj-sdk storj.io/storj/cmd/bootstrap storj.io/storj/cmd/satellite storj.io/storj/cmd/storagenode storj.io/storj/cmd/uplink storj.io/storj/cmd/gateway + ##@ Test .PHONY: test @@ -77,10 +84,10 @@ test-captplanet: ## Test source with captain planet (travis) @echo "Running ${@}" @./scripts/test-captplanet.sh -.PHONY: test-storj-sdk -test-storj-sdk: ## Test source with storj-sdk (travis) +.PHONY: test-sdk +test-sdk: ## Test source with storj-sdk (travis) @echo "Running ${@}" - @./scripts/test-storj-sdk.sh + @./scripts/test-sdk.sh .PHONY: test-certificate-signing test-certificate-signing: ## Test certificate signing service and storagenode setup (travis) diff --git a/scripts/test-storj-sdk-aws.sh b/scripts/test-sdk-aws.sh similarity index 100% rename from scripts/test-storj-sdk-aws.sh rename to scripts/test-sdk-aws.sh diff --git a/scripts/test-storj-sdk.sh b/scripts/test-sdk.sh similarity index 80% rename from scripts/test-storj-sdk.sh rename to scripts/test-sdk.sh index 1f3245726..b17694b7b 100755 --- a/scripts/test-storj-sdk.sh +++ b/scripts/test-sdk.sh @@ -3,7 +3,7 @@ set -ueo pipefail SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -go install -race -v storj.io/storj/cmd/{storj-sdk,bootstrap,satellite,storagenode,uplink,gateway} +make -C $SCRIPTDIR/.. install-sdk # setup tmpdir for testfiles and cleanup TMP=$(mktemp -d -t tmp.XXXXXXXXXX) @@ -18,7 +18,7 @@ export STORJ_LOCAL_NETWORK=$TMP storj-sdk -x network setup # run aws-cli tests -storj-sdk -x network test bash $SCRIPTDIR/test-storj-sdk-aws.sh +storj-sdk -x network test bash $SCRIPTDIR/test-sdk-aws.sh storj-sdk -x network destroy # ipv6 tests disabled because aws-cli doesn't seem to support connecting to ipv6 host