github.com/aporeto-inc/trireme-lib@v10.358.0+incompatible/.test.windows.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  # use wine to execute if not running tests on a Windows machine
     4  OS=`uname -s`
     5  if [[ $OS == *"NT-"* ]]; then
     6  	WINE_EXEC=
     7  else
     8  	WINE_EXEC="-exec wine"
     9  fi
    10  
    11  set -e
    12  echo "" > coverage.windows.txt
    13  
    14  for d in $(CGO_ENABLED=0 go list ./... | grep -v remoteenforcer | grep -v remoteapi | grep -v "plugins/pam"); do
    15      CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go test -tags test $WINE_EXEC -coverprofile=profile.windows.out -covermode=atomic $d
    16      if [ -f profile.windows.out ]; then
    17          cat profile.windows.out >> coverage.windows.txt
    18          rm profile.windows.out
    19      fi
    20  done