Skip to content

Commit

Permalink
Adjust bazel options for unit-testing in CI
Browse files Browse the repository at this point in the history
Disable caching of tests results and enable several runs per test.

Signed-off-by: Vasiliy Ulyanov <[email protected]>
  • Loading branch information
vasiliy-ul committed Mar 19, 2021
1 parent 0ed326b commit b755d17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bazel-push-images:
push: bazel-push-images

bazel-test:
hack/dockerized "hack/bazel-fmt.sh && hack/bazel-test.sh"
hack/dockerized "hack/bazel-fmt.sh && CI=${CI} hack/bazel-test.sh"

generate:
hack/dockerized "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY} VERBOSITY=${VERBOSITY} ./hack/generate.sh"
Expand Down
6 changes: 6 additions & 0 deletions hack/bazel-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ set -e
source hack/common.sh
source hack/config.sh

if [ "${CI}" == "true" ]; then
cat >>ci.bazelrc <<EOF
test --cache_test_results=no --runs_per_test=4
EOF
fi

bazel test \
--config=${ARCHITECTURE} \
--test_output=errors -- //staging/src/kubevirt.io/client-go/... //pkg/... //cmd/... //tests/framework/...

0 comments on commit b755d17

Please sign in to comment.