mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-24 10:11:48 +00:00
fixup tests
This commit is contained in:
14
Makefile
14
Makefile
@ -36,12 +36,18 @@ dist:
|
|||||||
@ bash scripts/publish.sh
|
@ bash scripts/publish.sh
|
||||||
|
|
||||||
# test.sh requires that we run the installed cmds, must not be out of date
|
# test.sh requires that we run the installed cmds, must not be out of date
|
||||||
test: install
|
test:
|
||||||
@ find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
|
@ find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
|
||||||
@ echo "==> Running unit tests"
|
@ echo "==> Running go test"
|
||||||
@ go test $(PACKAGES)
|
@ go test $(PACKAGES)
|
||||||
@ echo "==> Running integration tests (./tests)"
|
|
||||||
@ bash tests/test.sh
|
test_race:
|
||||||
|
@ find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
|
||||||
|
@ echo "==> Running go test --race"
|
||||||
|
@go test -v -race $(PACKAGES)
|
||||||
|
|
||||||
|
test_integrations:
|
||||||
|
@ bash test.sh
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
@ go fmt ./...
|
@ go fmt ./...
|
||||||
|
@ -16,7 +16,7 @@ checkout:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
override:
|
override:
|
||||||
- cd $REPO && make get_vendor_deps && make metalinter_test && bash ./test.sh
|
- cd $REPO && make get_vendor_deps && make metalinter_test && make test_integrations
|
||||||
post:
|
post:
|
||||||
- cd "$REPO" && bash <(curl -s https://codecov.io/bash) -f coverage.txt
|
- cd "$REPO" && bash <(curl -s https://codecov.io/bash) -f coverage.txt
|
||||||
- cd "$REPO" && mv coverage.txt "${CIRCLE_ARTIFACTS}"
|
- cd "$REPO" && mv coverage.txt "${CIRCLE_ARTIFACTS}"
|
||||||
|
@ -96,10 +96,10 @@ var RootCmd = &cobra.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func Execute() {
|
func Execute() error {
|
||||||
addGlobalFlags()
|
addGlobalFlags()
|
||||||
addCommands()
|
addCommands()
|
||||||
RootCmd.Execute()
|
return RootCmd.Execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
func addGlobalFlags() {
|
func addGlobalFlags() {
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
Execute()
|
err := Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Print(err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
10
test.sh
10
test.sh
@ -5,11 +5,11 @@ echo "" > coverage.txt
|
|||||||
|
|
||||||
echo "==> Running unit tests"
|
echo "==> Running unit tests"
|
||||||
for d in $(go list ./... | grep -v vendor); do
|
for d in $(go list ./... | grep -v vendor); do
|
||||||
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
||||||
if [ -f profile.out ]; then
|
if [ -f profile.out ]; then
|
||||||
cat profile.out >> coverage.txt
|
cat profile.out >> coverage.txt
|
||||||
rm profile.out
|
rm profile.out
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "==> Running integration tests (./tests)"
|
echo "==> Running integration tests (./tests)"
|
||||||
|
@ -48,7 +48,7 @@ func startClient(abciType string) abcicli.Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setOption(client abcicli.Client, key, value string) {
|
func setOption(client abcicli.Client, key, value string) {
|
||||||
_, err := client.SetOptionSync(key, value)
|
_, err := client.SetOptionSync(types.RequestSetOption{key, value})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panicf("setting %v=%v: \nerr: %v", key, value, err)
|
panicf("setting %v=%v: \nerr: %v", key, value, err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user