github.com/badrootd/celestia-core@v0.0.0-20240305091328-aa4207a4b25d/test/test_cover.sh (about)

     1  #! /bin/bash
     2  
     3  PKGS=$(go list github.com/cometbft/cometbft/...)
     4  
     5  set -e
     6  
     7  echo "mode: atomic" > coverage.txt
     8  for pkg in ${PKGS[@]}; do
     9  	go test -timeout 5m -race -coverprofile=profile.out -covermode=atomic "$pkg"
    10  	if [ -f profile.out ]; then
    11  		tail -n +2 profile.out >> coverage.txt;
    12  		rm profile.out
    13  	fi
    14  done