Browse Source

Merge pull request #280 from tendermint/develop

Develop
pull/286/head
Ethan Buchman 8 years ago
committed by GitHub
parent
commit
be3592adf6
6 changed files with 33 additions and 7 deletions
  1. +11
    -2
      README.md
  2. +3
    -1
      circle.yml
  3. +1
    -1
      mempool/mempool.go
  4. +1
    -2
      test/run_test.sh
  5. +4
    -1
      test/test.sh
  6. +13
    -0
      test/test_cover.sh

+ 11
- 2
README.md View File

@ -1,8 +1,17 @@
# Tendermint
Simple, Secure, Scalable Blockchain Platform
[![CircleCI](https://circleci.com/gh/tendermint/tendermint.svg?style=svg)](https://circleci.com/gh/tendermint/tendermint)
[![codecov](https://codecov.io/gh/tendermint/tendermint/branch/develop/graph/badge.svg)](https://codecov.io/gh/tendermint/tendermint)
[![version](https://img.shields.io/github/tag/tendermint/tendermint.svg)](https://github.com/tendermint/tendermint/releases/latest)
[![API Reference](
https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667
)](https://godoc.org/github.com/tendermint/tendermint)
[![chat](https://img.shields.io/badge/slack-join%20chat-pink.svg)](http://forum.tendermint.com:3000/)
[![license](https://img.shields.io/github/license/tendermint/tendermint.svg)](https://github.com/tendermint/tendermint/blob/master/LICENSE)
Branch | Tests | Coverage | Report Card
----------|-------|----------|-------------
develop | [![CircleCI](https://circleci.com/gh/tendermint/tendermint/tree/develop.svg?style=shield)](https://circleci.com/gh/tendermint/tendermint/tree/develop) | [![codecov](https://codecov.io/gh/tendermint/tendermint/branch/develop/graph/badge.svg)](https://codecov.io/gh/tendermint/tendermint) | [![Go Report Card](https://goreportcard.com/badge/github.com/tendermint/tendermint/tree/develop)](https://goreportcard.com/report/github.com/tendermint/tendermint/tree/develop)
master | [![CircleCI](https://circleci.com/gh/tendermint/tendermint/tree/master.svg?style=shield)](https://circleci.com/gh/tendermint/tendermint/tree/master) | [![codecov](https://codecov.io/gh/tendermint/tendermint/branch/master/graph/badge.svg)](https://codecov.io/gh/tendermint/tendermint) | [![Go Report Card](https://goreportcard.com/badge/github.com/tendermint/tendermint/tree/master)](https://goreportcard.com/report/github.com/tendermint/tendermint/tree/master)
_NOTE: This is yet pre-alpha non-production-quality software._


+ 3
- 1
circle.yml View File

@ -31,4 +31,6 @@ test:
override:
- "cd $REPO && make test_integrations"
post:
- bash <(curl -s https://codecov.io/bash)
- "cd $REPO && bash <(curl -s https://codecov.io/bash)"

+ 1
- 1
mempool/mempool.go View File

@ -239,7 +239,7 @@ func (mem *Mempool) resCbRecheck(req *tmsp.Request, res *tmsp.Response) {
}
// Get the valid transactions remaining
// If maxTxs is 0, there is no cap.
// If maxTxs is -1, there is no cap on returned transactions.
func (mem *Mempool) Reap(maxTxs int) []types.Tx {
mem.proxyMtx.Lock()
defer mem.proxyMtx.Unlock()


+ 1
- 2
test/run_test.sh View File

@ -6,8 +6,7 @@ echo `pwd`
BRANCH=`git rev-parse --abbrev-ref HEAD`
echo "Current branch: $BRANCH"
# go test --race github.com/tendermint/tendermint/...
make test_race
bash test/test_cover.sh
# run the app tests
bash test/app/test.sh


+ 4
- 1
test/test.sh View File

@ -10,7 +10,10 @@ bash ./test/docker/build.sh
echo ""
echo "* running go tests and app tests in docker container"
docker run -t tester bash test/run_test.sh
docker run --name run_test -t tester bash test/run_test.sh
# copy the coverage results out of docker container
docker cp run_test:/go/src/github.com/tendermint/tendermint/coverage.txt .
# test basic network connectivity
# by starting a local testnet and checking peers connect and make blocks


+ 13
- 0
test/test_cover.sh View File

@ -0,0 +1,13 @@
#! /bin/bash
PKGS=$(go list github.com/tendermint/tendermint/... | grep -v /vendor/)
set -e
echo "mode: atomic" > coverage.txt
for pkg in ${PKGS[@]}; do
go test -race -coverprofile=profile.out -covermode=atomic $pkg
if [ -f profile.out ]; then
tail -n +2 profile.out >> coverage.txt;
rm profile.out
fi
done

Loading…
Cancel
Save