diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 8922c9edbe46..af45f697260a 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -131,7 +131,6 @@ elif [[ "$1" == "bazel.coverage" ]]; then # directory. Wow. cd "${ENVOY_BUILD_DIR}" SRCDIR="${GCOVR_DIR}" "${ENVOY_SRCDIR}"/test/run_envoy_bazel_coverage.sh - rsync -av "${ENVOY_BUILD_DIR}"/bazel-envoy/generated/coverage/ "${ENVOY_COVERAGE_DIR}" exit 0 elif [[ "$1" == "bazel.coverity" ]]; then # Coverity Scan version 2017.07 fails to analyze the entirely of the Envoy diff --git a/test/run_envoy_bazel_coverage.sh b/test/run_envoy_bazel_coverage.sh index 3d138740b2be..353fcc8977a5 100755 --- a/test/run_envoy_bazel_coverage.sh +++ b/test/run_envoy_bazel_coverage.sh @@ -73,6 +73,8 @@ time "${GCOVR}" --gcov-exclude="${GCOVR_EXCLUDE_REGEX}" \ # run. rm "${SRCDIR}"/test/coverage/BUILD +[[ -z "${ENVOY_COVERAGE_DIR}" ]] || rsync -av "${COVERAGE_DIR}"/ "${ENVOY_COVERAGE_DIR}" + COVERAGE_VALUE=$(grep -Po 'lines: \K(\d|\.)*' "${COVERAGE_SUMMARY}") COVERAGE_THRESHOLD=98.0 COVERAGE_FAILED=$(echo "${COVERAGE_VALUE}<${COVERAGE_THRESHOLD}" | bc)