Skip to content

Commit

Permalink
Don't create cover profiles when running tests from vim
Browse files Browse the repository at this point in the history
Co-authored-by: Danail Branekov <[email protected]>
  • Loading branch information
Kieron Browne and danail-branekov committed Jul 13, 2023
1 parent d9293bc commit f76c0cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if ! grep -q e2e <(echo "$@"); then
source <(setup-envtest use -p env --bin-dir "${ENVTEST_ASSETS_DIR}")
fi

extra_args+=("--poll-progress-after=60s" "--skip-package=e2e" "--coverprofile=cover.out" "--coverpkg=code.cloudfoundry.org/korifi/...")
extra_args+=("--poll-progress-after=60s" "--skip-package=e2e")
else
export ROOT_NAMESPACE="${ROOT_NAMESPACE:-cf}"
export APP_FQDN="${APP_FQDN:-apps-127-0-0-1.nip.io}"
Expand All @@ -57,6 +57,10 @@ else
kubectl wait --for=condition=ready clusterbuilder --all=true --timeout=15m
fi

if [[ -z "${NO_COVERAGE:-}" ]]; then
extra_args+=("--coverprofile=cover.out" "--coverpkg=code.cloudfoundry.org/korifi/...")
fi

if [[ -z "${NON_RECURSIVE_TEST:-}" ]]; then
extra_args+=("-r")
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"

NON_RECURSIVE_TEST=true $SCRIPT_DIR/run-tests.sh $@
NO_COVERAGE=true NON_RECURSIVE_TEST=true $SCRIPT_DIR/run-tests.sh $@

0 comments on commit f76c0cf

Please sign in to comment.