github.com/masterhung0112/hk_server/v5@v5.0.0-20220302090640-ec71aef15e1c/scripts/test-xprog.sh (about)

     1  #!/usr/bin/env bash
     2  set -e
     3  [[ $1 =~ (github.com.*)/_test ]] && \
     4      echo Testing ${BASH_REMATCH[1]}
     5  coverprofile=`pwd`/cprofile.out
     6  if [[ $1 == *"/enterprise/"* ]]; then
     7      cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")"
     8  fi
     9  "$@" -test.coverprofile "$coverprofile"