Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup makefile #49

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
command: make install-tools
- run:
name: Verify
command: make all
command: make ci
13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,10 @@ all-pkgs:
all-srcs:
@echo $(ALL_SRC) | tr ' ' '\n' | sort

.DEFAULT_GOAL := addlicense-fmt-impi-vet-lint-goimports-misspell-staticcheck-test
.DEFAULT_GOAL := all

.PHONY: all
all: addlicense-fmt-impi-vet-lint-goimports-misspell-staticcheck-test otelcontribcol

.PHONY: addlicense-fmt-impi-vet-lint-goimports-misspell-staticcheck-test
addlicense-fmt-impi-vet-lint-goimports-misspell-staticcheck-test: addlicense fmt impi vet lint goimports misspell staticcheck test
all: addlicense fmt impi vet lint goimports misspell staticcheck test otelcontribcol

.PHONY: test
test:
Expand All @@ -56,16 +53,14 @@ benchmark:
$(GOTEST) -bench=. -run=notests $(ALL_PKGS)

.PHONY: ci
ci: fmt vet lint goimports misspell staticcheck test-with-cover otelcontribcol
$(MAKE) -C testbed install-tools
$(MAKE) -C testbed runtests
ci: all test-with-cover

.PHONY: test-with-cover
test-with-cover:
@echo Verifying that all packages have test files to count in coverage
@scripts/check-test-files.sh $(subst github.com/open-telemetry/opentelemetry-collector-contrib/,./,$(ALL_PKGS))
@echo pre-compiling tests
@time go test -i $(ALL_PKGS)
go test -i $(ALL_PKGS)
$(GOTEST) $(GOTEST_OPT_WITH_COVERAGE) $(ALL_PKGS)
go tool cover -html=coverage.txt -o coverage.html

Expand Down