Skip to content

Commit

Permalink
removing coverage omission and setting default packages again
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-at-startupmedia committed Oct 24, 2024
1 parent 7835d50 commit 4f51ec2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ TEST_REGEX := $(or $(TEST_REGEX),"Test")
TEST_FILE_CONFIG ?= $(PROJECT_PATH)/test/e2e/config/test-config.core.yml
TEST_DIR_LOGS=$(shell cat $(TEST_FILE_CONFIG) | grep "directory:" | sed -n "1 p" | cut -d' ' -f4)
TEST_ARTIFACT_PATH=$(shell dirname "$(TEST_DIR_LOGS)")
DEFAULT_TEST_PACKAGES := "./..."
DEFAULT_TEST_PACKAGES := "pmon3/cli/controller/...,pmon3/cli/output/...,pmon3/cli/shell/,pmon3/conf,pmon3/model/...,pmon3/pmond/controller/...,pmon3/pmond/flap_detector,pmon3/pmond/god,pmon3/pmond/observer,pmon3/pmond/process,pmon3/pmond/repo,pmon3/pmond/shell"
TEST_PACKAGES := $(or $(TEST_PACKAGES),$(DEFAULT_TEST_PACKAGES))
COVERAGE_OMISSION := '!/^(pmon3\/utils|pmon3\/test|pmon3\/cmd|pmon3\/cli\/cobra|pmon3\/protos)/'

all: help

Expand Down Expand Up @@ -104,9 +103,7 @@ run_test: clean make_test_app ## run the tests
.PHONY: run_test_cover
run_test_cover: clean make_test_app ## run the tests and generate a coverage report
$(call print-target)
PROJECT_PATH=$(PROJECT_PATH) ARTIFACT_PATH=$(TEST_ARTIFACT_PATH) $(GO) test $(BUILD_FLAGS) -v -run $(TEST_REGEX) -p 1 -coverprofile=coverage.txt -coverpkg=$(TEST_PACKAGES) ./test/e2e/
awk $(COVERAGE_OMISSION) coverage.txt > coverage.out
rm -f coverage.txt
PROJECT_PATH=$(PROJECT_PATH) ARTIFACT_PATH=$(TEST_ARTIFACT_PATH) $(GO) test $(BUILD_FLAGS) -v -run $(TEST_REGEX) -p 1 -coverprofile=coverage.out -coverpkg=$(TEST_PACKAGES) ./test/e2e/

.PHONY: codecov
codecov: ## process the coverage report and upload it
Expand Down

0 comments on commit 4f51ec2

Please sign in to comment.