2020-05-20 13:41:23 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-09-19 12:47:13 +02: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-06-15 12:46:54 +02:00
|
|
|
|
2020-05-20 13:41:23 +02:00
|
|
|
pushd ..
|
|
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags release -o piper
|
2020-06-15 12:46:54 +02:00
|
|
|
|
2022-09-19 12:47:13 +02:00
|
|
|
if [[ "$*" ]]
|
2020-06-15 12:46:54 +02:00
|
|
|
then
|
2022-09-19 12:47:13 +02:00
|
|
|
for testName in "$@"
|
|
|
|
do
|
|
|
|
go test -v -tags integration -run "$testName" ./integration/...
|
|
|
|
done
|
2020-06-15 12:46:54 +02:00
|
|
|
else
|
2022-09-19 12:47:13 +02:00
|
|
|
go test -v -tags integration ./integration/...
|
2020-06-15 12:46:54 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
popd || exit
|