Code coverage for smoke tests.
Allow non-circle people to build coverage reports.
This commit is contained in:
1 parent
da41604229
commit
00a7490a1d
12 files changed
+211
-14
No files matched your search
@@ -86,6 +86,7 @@ exec_remote() {
|
||||
-e DOCKER_BRIDGE \
|
||||
-e PROXY_HOST="$PROXY_HOST" \
|
||||
-e WEAVE_CIDR=none \
|
||||
-e COVERAGE \
|
||||
$WEAVEEXEC_DOCKER_ARGS $EXEC_IMAGE --local "$@"
|
||||
}
|
||||
|
||||
@@ -412,7 +413,11 @@ ask_version() {
|
||||
echo "Unable to find $2 image." >&2
|
||||
fi
|
||||
fi
|
||||
[ -n "$DOCKERIMAGE" ] && docker run --rm -e WEAVE_CIDR=none $DOCKERIMAGE --version
|
||||
COVERAGE_ARGS=""
|
||||
if [ -n "$COVERAGE" -a "$1" = "$CONTAINER_NAME" ] ; then
|
||||
COVERAGE_ARGS="-test.coverprofile=/home/weave/cover.router.prof --"
|
||||
fi
|
||||
[ -n "$DOCKERIMAGE" ] && docker run --rm -e WEAVE_CIDR=none $DOCKERIMAGE $COVERAGE_ARGS --version
|
||||
}
|
||||
|
||||
######################################################################
|
||||
@@ -1037,6 +1042,10 @@ launch_router() {
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
COVERAGE_ARGS=""
|
||||
if [ -n "$COVERAGE" ] ; then
|
||||
COVERAGE_ARGS="-test.coverprofile=/home/weave/cover.router.prof --"
|
||||
fi
|
||||
# Set WEAVE_DOCKER_ARGS in the environment in order to supply
|
||||
# additional parameters, such as resource limits, to docker
|
||||
# when launching the weave container.
|
||||
@@ -1045,7 +1054,7 @@ launch_router() {
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-e WEAVE_PASSWORD \
|
||||
-e WEAVE_CIDR=none \
|
||||
$WEAVE_DOCKER_ARGS $IMAGE --iface $CONTAINER_IFNAME --port $CONTAINER_PORT --name "$PEERNAME" --nickname "$(hostname)" --ipalloc-range "$IPRANGE" "$@")
|
||||
$WEAVE_DOCKER_ARGS $IMAGE $COVERAGE_ARGS --iface $CONTAINER_IFNAME --port $CONTAINER_PORT --name "$PEERNAME" --nickname "$(hostname)" --ipalloc-range "$IPRANGE" "$@")
|
||||
with_container_netns_or_die $CONTAINER launch
|
||||
wait_for_status $CONTAINER_NAME $HTTP_PORT
|
||||
if [ -n "$IPRANGE" ] ; then
|
||||
|
||||
Reference in new issue
Block a user