1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/integration/run-tests.sh
Florian Wilhelm 0fcf1654fe
Install maven artifacts after mta build (#1641)
Extend mta build step to install maven artefacts after build to allow re-using them in later stages (additional unit or integration tests which might not be running as part of the "build" life-cycle).
2020-06-15 12:46:54 +02:00

19 lines
451 B
Bash
Executable File

#!/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
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