github.com/ngocphuongnb/tetua@v0.0.7-alpha/test/dir.sh (about)

     1  #!/bin/bash
     2  
     3  if [ "$#" -ne 1 ]; then
     4    echo "Illegal number of parameters"
     5  fi
     6  
     7  rootDir=$PWD
     8  
     9  cd $1
    10  go test -coverprofile $rootDir/test/coverage.txt
    11  go tool cover -html=$rootDir/test/coverage.txt -o $rootDir/test/coverage.html
    12  cd $rootDir