1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

19 lines
451 B
Bash
Raw Normal View History

2020-05-20 13:41:23 +02:00
#!/usr/bin/env bash
# Run all test if no arguments are given, run a single test function if it is passed as $1
# For example: `./run-tests.sh TestRegistrySetInNpmrc`
TEST_NAME=$1
2020-05-20 13:41:23 +02:00
pushd ..
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags release -o piper
if [[ "$TEST_NAME" ]]
then
go test -tags=integration -timeout 20m -run "$TEST_NAME" ./integration/...
else
go test -tags=integration -timeout 20m ./integration/...
fi
popd || exit