diff --git a/Makefile b/Makefile index 798a9681b..208b59ade 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ -PACKAGES=$(shell go list ./... | grep -v '/vendor/') -PACKAGES_NOCLITEST=$(shell go list ./... | grep -v '/vendor/' | grep -v '/simulation' | grep -v github.com/cosmos/cosmos-sdk/cmd/gaia/cli_test) -PACKAGES_SIMTEST=$(shell go list ./... | grep -v '/vendor/' | grep '/simulation') +PACKAGES_NOSIMULATION=$(shell go list ./... | grep -v '/simulation') +PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation') COMMIT_HASH := $(shell git rev-parse --short HEAD) BUILD_TAGS = netgo ledger BUILD_FLAGS = -tags "${BUILD_TAGS}" -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=${COMMIT_HASH}" @@ -123,13 +122,13 @@ godocs: test: test_unit test_cli: - @go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/cmd/gaia/cli_test` + @go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/cmd/gaia/cli_test` -tags=cli_test test_unit: - @go test $(PACKAGES_NOCLITEST) + @go test $(PACKAGES_NOSIMULATION) test_race: - @go test -race $(PACKAGES_NOCLITEST) + @go test -race $(PACKAGES_NOSIMULATION) test_sim: @echo "Running individual module simulations." @@ -156,7 +155,7 @@ format: find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs misspell -w benchmark: - @go test -bench=. $(PACKAGES_NOCLITEST) + @go test -bench=. $(PACKAGES_NOSIMULATION) ######################################## diff --git a/PENDING.md b/PENDING.md index 21223bd7a..5b4048888 100644 --- a/PENDING.md +++ b/PENDING.md @@ -46,6 +46,7 @@ IMPROVEMENTS * [x/gov] Votes on a proposal can now be queried * [x/bank] Unit tests are now table-driven * [tests] Fixes ansible scripts to work with AWS too +* [tests] \#1806 CLI tests are now behind the build flag 'cli_test', so go test works on a new repo BUG FIXES * \#1666 Add intra-tx counter to the genesis validators diff --git a/cmd/gaia/cli_test/cli_test.go b/cmd/gaia/cli_test/cli_test.go index e6ec2543f..7fa438e9d 100644 --- a/cmd/gaia/cli_test/cli_test.go +++ b/cmd/gaia/cli_test/cli_test.go @@ -1,3 +1,5 @@ +// +build cli_test + package clitest import ( diff --git a/cmd/gaia/cli_test/doc.go b/cmd/gaia/cli_test/doc.go new file mode 100644 index 000000000..bcf9c5e4d --- /dev/null +++ b/cmd/gaia/cli_test/doc.go @@ -0,0 +1,3 @@ +package clitest + +// package clitest runs integration tests which make use of CLI commands.