From 1d49453ffb63dab9568d8333b75b8fd8b0f4b177 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 14 Nov 2017 12:53:40 -0600 Subject: [PATCH] fix integration tests (Fixes #131) --- Makefile | 6 +++--- tests/test_app/app.go | 2 +- tests/test_app/test.sh | 2 +- tests/test_cli/test.sh | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a22a2e90..6c99e363 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ GOTOOLS = \ all: protoc install test -NOVENDOR = go list github.com/tendermint/abci/... | grep -v /vendor/ +PACKAGES=$(shell go list ./... | grep -v '/vendor/') install-protoc: # Download: https://github.com/google/protobuf/releases @@ -27,7 +27,7 @@ dist: # test.sh requires that we run the installed cmds, must not be out of date test: install find . -path ./vendor -prune -o -name *.sock -exec rm {} \; - @ go test -p 1 `${NOVENDOR}` + @ go test $(PACKAGES) @ bash tests/test.sh fmt: @@ -36,7 +36,7 @@ fmt: test_integrations: get_vendor_deps install test get_deps: - @ go get -d `${NOVENDOR}` + @ go get -d $(PACKAGES) tools: go get -u -v $(GOTOOLS) diff --git a/tests/test_app/app.go b/tests/test_app/app.go index 7fc3ace0..127ba78f 100644 --- a/tests/test_app/app.go +++ b/tests/test_app/app.go @@ -18,7 +18,7 @@ func startApp(abciApp string) *process.Process { proc, err := process.StartProcess("abci_app", "", "bash", - []string{"-c", abciApp}, + []string{"-c", fmt.Sprintf("abci-cli %s", abciApp)}, nil, os.Stdout, ) diff --git a/tests/test_app/test.sh b/tests/test_app/test.sh index 0620b476..5b523fef 100755 --- a/tests/test_app/test.sh +++ b/tests/test_app/test.sh @@ -15,7 +15,7 @@ cd "$DIR" ABCI_APP="counter" go run ./*.go # test golang counter via grpc -ABCI_APP="counter -abci=grpc" ABCI="grpc" go run ./*.go +ABCI_APP="counter --abci=grpc" ABCI="grpc" go run ./*.go # test nodejs counter # TODO: fix node app diff --git a/tests/test_cli/test.sh b/tests/test_cli/test.sh index 81b06a0e..ea4ea4fa 100644 --- a/tests/test_cli/test.sh +++ b/tests/test_cli/test.sh @@ -17,7 +17,7 @@ function testExample() { $APP &> /dev/null & sleep 2 abci-cli --verbose batch < "$INPUT" > "${INPUT}.out.new" - killall $3 + killall "$3" pre=$(shasum < "${INPUT}.out") post=$(shasum < "${INPUT}.out.new")