Skip to content

Commit

Permalink
build.make: more readable "make test" output
Browse files Browse the repository at this point in the history
The introduction for each individual test looked like an actual
command:

  test-subtree
  ./release-tools/verify-subtree.sh release-tools
  Directory 'release-tools' contains non-upstream changes:
  ...

It's better to make it look like a shell comment and increase its
visibility with a longer prefix:

  ### test-subtree:
  ./release-tools/verify-subtree.sh release-tools
  ...
  • Loading branch information
pohly committed Jan 25, 2019
1 parent 147892c commit b0336b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.make
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,19 @@ test:
.PHONY: test-go
test: test-go
test-go:
@ echo; echo $@
@ echo; echo "### $@:"
go test `go list ./... | grep -v 'vendor' $(TEST_GO_FILTER_CMD)` $(TESTARGS)

.PHONY: test-vet
test: test-vet
test-vet:
@ echo; echo $@
@ echo; echo "### $@:"
go vet `go list ./... | grep -v vendor $(TEST_VET_FILTER_CMD)`

.PHONY: test-fmt
test: test-fmt
test-fmt:
@ echo; echo $@
@ echo; echo "### $@:"
files=$$(find . -name '*.go' | grep -v './vendor' $(TEST_FMT_FILTER_CMD)); \
if [ $$(gofmt -d $$files | wc -l) -ne 0 ]; then \
echo "formatting errors:"; \
Expand All @@ -120,5 +120,5 @@ test-fmt:
.PHONY: test-subtree
test: test-subtree
test-subtree:
@ echo; echo $@
@ echo; echo "### $@:"
./release-tools/verify-subtree.sh release-tools

0 comments on commit b0336b5

Please sign in to comment.