github.com/evdatsion/aphelion-dpos-bft@v0.32.1/libs/test.sh (about)

     1  #!/usr/bin/env bash
     2  set -e
     3  
     4  # run the linter
     5  # make lint
     6  
     7  # run the unit tests with coverage
     8  echo "" > coverage.txt
     9  for d in $(go list ./... | grep -v vendor); do
    10  	go test -race -coverprofile=profile.out -covermode=atomic "$d"
    11  	if [ -f profile.out ]; then
    12  		cat profile.out >> coverage.txt
    13  		rm profile.out
    14  	fi
    15  done