mirror of https://github.com/linkerd/linkerd2.git
23 lines
535 B
Bash
Executable File
23 lines
535 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
# When set, causes docker's build output to be emitted to stderr.
|
|
export DOCKER_TRACE=${DOCKER_TRACE:-}
|
|
export RUST_LOG=${RUST_LOG:-}
|
|
|
|
bindir=$( cd "${BASH_SOURCE[0]%/*}" && pwd )
|
|
rootdir=$( cd "$bindir"/.. && pwd )
|
|
|
|
if [ -n "$DOCKER_TRACE" ]; then
|
|
output=/dev/stderr
|
|
else
|
|
output=/dev/null
|
|
fi
|
|
|
|
docker build -f "$rootdir/proxy/Dockerfile" . \
|
|
--target build \
|
|
-t proxy-build \
|
|
--build-arg=PROXY_UNOPTIMIZED=1 > $output
|
|
docker run --rm -it proxy-build env RUST_LOG="$RUST_LOG" cargo test "$@"
|