github.com/line/ostracon@v1.0.10-0.20230328032236-7f20145f065d/test/test_cover.sh (about)

     1  #! /bin/bash
     2  
     3  PKGS=$(go list github.com/line/ostracon/...)
     4  
     5  set -e
     6  
     7  echo "mode: atomic" > coverage.txt
     8  for pkg in ${PKGS[@]}; do
     9  	# timeout: the `consensus`, `mempool` and `types` package will take too much time
    10  	go test -timeout 8m -race -coverprofile=profile.out -covermode=atomic "$pkg"
    11  	if [ -f profile.out ]; then
    12  		tail -n +2 profile.out >> coverage.txt;
    13  		rm profile.out
    14  	fi
    15  done