Files
sap-jenkins-library/integration/run-tests.sh
T

20 lines
460 B
Bash
Raw Normal View History

2020-05-20 13:41:23 +02:00
#!/usr/bin/env bash
2022-09-19 14:47:13 +04:00
# 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
2022-09-19 14:47:13 +04:00
if [[ "$*" ]]
then
2022-09-19 14:47:13 +04:00
for testName in "$@"
do
go test -v -tags integration -run "$testName" ./integration/...
done
else
2022-09-19 14:47:13 +04:00
go test -v -tags integration ./integration/...
fi
popd || exit