etcd/tests/functional/build.sh
Piotr Tabor ea8b9e6c18 Improve output of the 'functional' tests
- Use go testing infrastructure, such that logs are printed only in
case of failure.
 - Split the test into multiple sub-round and sub-round-testcases such
   that tree of execution reflects the logic.
 - Use 'development' loggers that are formatting the output to be human
readable.
2021-05-31 15:31:48 +02:00

17 lines
640 B
Bash
Executable File

#!/usr/bin/env bash
if ! [[ "$0" =~ "tests/functional/build" ]]; then
echo "must be run from repository root"
exit 255
fi
outdir="${BINDIR:-../bin}"
(
cd ./tests
CGO_ENABLED=0 go build -v -installsuffix cgo -ldflags "-s" -o "${outdir}/etcd-agent" ./functional/cmd/etcd-agent
CGO_ENABLED=0 go build -v -installsuffix cgo -ldflags "-s" -o "${outdir}/etcd-proxy" ./functional/cmd/etcd-proxy
CGO_ENABLED=0 go build -v -installsuffix cgo -ldflags "-s" -o "${outdir}/etcd-runner" ./functional/cmd/etcd-runner
CGO_ENABLED=0 go test -v -installsuffix cgo -ldflags "-s" -c -o "${outdir}/etcd-tester" ./functional/cmd/etcd-tester
)