github.com/vlifesystems/rulehunter@v0.0.0-20180501090014-673078aa4a83/linux-test-su.sh (about) 1 #!/usr/bin/env bash 2 # This script is used to run the tests under linux as root 3 # 4 # Usage: 5 # linux-test-su.sh goPath goBinPath initSystem 6 # 7 # goPath is the standard GOPATH 8 # goBinPath is the location of go 9 # initSystem can be systemd or upstart 10 # 11 # Typical usages: 12 # sudo ./linux-test-su.sh $GOPATH `which go` systemd 13 # sudo ./linux-test-su.sh $GOPATH `which go` upstart 14 # 15 # Using Fish: 16 # sudo ./linux-test-su.sh $GOPATH (which go) systemd 17 # sudo ./linux-test-su.sh $GOPATH (which go) upstart 18 19 20 export GOPATH=$1 21 export GOBIN=`dirname $(dirname $2)`/bin 22 $GOBIN/go test -v -tags="su $3" ./...