github.com/Aoi-hosizora/ahlib-more@v1.5.1-0.20230404072844-256112befaf6/go.test.sh (about)

     1  #!/bin/bash
     2  
     3  set -e
     4  function test_module {
     5      for package in $(go list ./...); do
     6          go test $package -v -count=1 -race -cover -covermode=atomic -coverprofile=$profile
     7          test -f $profile && cat $profile >> $coverage && rm $profile
     8      done
     9  }
    10  
    11  rm -f coverage.txt
    12  coverage=coverage.txt
    13  profile=profile.out
    14  test_module