1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-16 05:16:08 +02:00
sap-jenkins-library/integration/run-tests.sh

20 lines
460 B
Bash
Raw Permalink Normal View History

2020-05-20 13:41:23 +02:00
#!/usr/bin/env bash
# Run all test if no arguments are given, run tests if they've passed as arguments
# For example: ./run-tests.sh TestNexusIntegration TestNPMIntegration
2020-05-20 13:41:23 +02:00
pushd ..
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags release -o piper
if [[ "$*" ]]
then
for testName in "$@"
do
go test -v -tags integration -run "$testName" ./integration/...
done
else
go test -v -tags integration ./integration/...
fi
popd || exit