From 93b72558ad6deef83b1401b55f1ade60a59def08 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Fri, 24 Apr 2020 03:21:48 -0700 Subject: [PATCH] runtime: enable make file go test needs explicit -mod=vendor argument. Signed-off-by: Peng Tao --- src/runtime/.gitignore | 2 ++ src/runtime/Makefile | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runtime/.gitignore b/src/runtime/.gitignore index a8942b24d9..17686ab0fe 100644 --- a/src/runtime/.gitignore +++ b/src/runtime/.gitignore @@ -1,6 +1,8 @@ *.o *.patch *.swp +coverage.txt +coverage.html .git-commit .git-commit.tmp /cli/config/configuration-acrn.toml diff --git a/src/runtime/Makefile b/src/runtime/Makefile index 14a0ea4799..bff8806315 100644 --- a/src/runtime/Makefile +++ b/src/runtime/Makefile @@ -668,7 +668,7 @@ check: check-go-static test: go-test go-test: $(GENERATED_FILES) - $(QUIET_TEST).ci/go-test.sh + go test -v -mod=vendor ./... check-go-static: $(QUIET_CHECK).ci/static-checks.sh @@ -676,7 +676,8 @@ check-go-static: $(QUIET_CHECK).ci/go-no-os-exit.sh ./virtcontainers coverage: - $(QUIET_TEST).ci/go-test.sh html-coverage + go test -v -mod=vendor -covermode=atomic -coverprofile=coverage.txt ./... + go tool cover -html=coverage.txt -o coverage.html install: default install-runtime install-containerd-shim-v2 install-netmon