github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/integration/run-tests.sh (about) 1 #!/usr/bin/env bash 2 3 # Run all test if no arguments are given, run tests if they've passed as arguments 4 # For example: ./run-tests.sh TestNexusIntegration TestNPMIntegration 5 6 pushd .. 7 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags release -o piper 8 9 if [[ "$*" ]] 10 then 11 for testName in "$@" 12 do 13 go test -v -tags integration -run "$testName" ./integration/... 14 done 15 else 16 go test -v -tags integration ./integration/... 17 fi 18 19 popd || exit