Address review comments.

This commit is contained in:
Katharine Berry
2018-08-31 10:49:36 -07:00
parent 9d499cd005
commit 0fb4b920b5
2 changed files with 4 additions and 6 deletions

View File

@@ -453,7 +453,7 @@ kube::golang::outfile_for_binary() {
# Argument: the name of a Kubernetes package.
# Returns 0 if the binary can be built with coverage, 1 otherwise.
# NB: this ignores whether coverage is globally enabled or not.
kube::golang::is_covered_binary() {
kube::golang::is_instrumented_package() {
return $(kube::util::array_contains "$1" "${KUBE_COVERAGE_INSTRUMENTED_PACKAGES[@]}")
}
@@ -514,7 +514,7 @@ kube::golang::build_some_binaries() {
if [[ -n "${build_with_coverage:-}" ]]; then
local -a uncovered=()
for package in "$@"; do
if kube::golang::is_covered_binary "${package}"; then
if kube::golang::is_instrumented_package "${package}"; then
V=2 kube::log::info "Building ${package} with coverage..."
kube::golang::create_coverage_dummy_test "${package}"