Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit f5450fe

Browse files
committed
Fix coverage-bin script
Signed-off-by: Joffrey F <[email protected]>
1 parent 037ed7a commit f5450fe

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build
77
RUN apk add --no-cache \
88
build-base \
99
git \
10-
util-linux
10+
util-linux \
11+
bash
1112
WORKDIR /go/src/github.com/docker/lunchbox/
1213
COPY . .
1314

e2e/coverage-bin

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
# This script is a proxy that injects the required test flags and strips out test output
44
# It allows us to use a coverage-enabled binary for e2e tests
55

6-
../_build/docker-app.cov \
7-
-test.coverprofile=../_build/cov/$(uuidgen).out \
8-
$* \
6+
BUILD_DIR=${BASH_SOURCE%/*}/../_build
7+
8+
$BUILD_DIR/docker-app.cov \
9+
-test.coverprofile=$BUILD_DIR/cov/$(uuidgen).out \
10+
"$@" \
911
| grep -vE '^PASS$' \
1012
| grep -vE '^coverage: [0-9]+\.[0-9]+% of statements in .+$' \
1113
| grep -v '^=== RUN TestRunMain$'
14+
15+
exit ${PIPESTATUS[0]}

0 commit comments

Comments
 (0)