github.com/simonferquel/app@v0.6.1-0.20181012141724-68b7cccf26ac/e2e/coverage-bin (about) 1 #!/bin/bash 2 3 # This script is a proxy that injects the required test flags and strips out test output 4 # It allows us to use a coverage-enabled binary for e2e tests 5 6 BUILD_DIR=${BASH_SOURCE%/*}/../_build 7 8 $BUILD_DIR/docker-app.cov \ 9 -test.coverprofile=$BUILD_DIR/cov/$(uuidgen).out \ 10 "$@" \ 11 | grep -vE '^PASS$' \ 12 | grep -vE '^coverage: [0-9]+\.[0-9]+% of statements in .+$' \ 13 | grep -v '^=== RUN TestRunMain$' 14 15 exit ${PIPESTATUS[0]}