github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/scripts/run_go_unittest.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -e
     4  
     5  echo "" > coverage.project.out
     6  
     7  for d in $(go list ./... | grep -v vendor/examples/tests); do
     8      if [[ "$d" == *examples*  ]]; then
     9          continue
    10      fi
    11      if [[ "$d" == *test* ]]; then
    12          continue
    13      fi
    14  
    15      echo $d
    16      go test -race -coverprofile=coverage.out -covermode=atomic "$d" -v
    17      if [[ -f coverage.out ]]; then
    18          cat coverage.out >> coverage.project.out
    19          rm coverage.out
    20      fi
    21  done
    22