From 70e725cedd8804b54069aec77bb7a90f7b4b175d Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 7 Jan 2016 15:32:06 -0500 Subject: [PATCH 1/2] Makefile: add a target to run tests For now, just vet and lint. But would like to include the commit validator, once a good range is selectable. Signed-off-by: Vincent Batts --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Makefile b/Makefile index 28d70672c..e894798f0 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ DOC_FILES := \ glossary.md docs: pdf html +.PHONY: docs pdf: @mkdir -p output/ && \ @@ -40,6 +41,22 @@ html: vbatts/pandoc -f markdown_github -t html5 -o /output/docs.html $(patsubst %,/input/%,$(DOC_FILES)) && \ ls -sh $(shell readlink -f output/docs.html) +.PHONY: test .govet .golint .gitvalidation + +test: .govet .golint + +# `go get golang.org/x/tools/cmd/vet` +.govet: + go vet -x ./... + +# `go get github.com/golang/lint/golint` +.golint: + golint ./... + +# `go get github.com/vbatts/git-validation` +.gitvalidation: + git-validation -run DCO,short-subject -v -range ${TRAVIS_COMMIT_RANGE} + clean: rm -rf output/ *~ From 0cd1ca4d1d92a56fb180a8863558c3a544a77a11 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 13 Jan 2016 19:00:56 -0500 Subject: [PATCH 2/2] Makefile: git-validation from an arbitrary epoch Since we can't go from the first commit, choosing an arbitrary epoch commit Signed-off-by: Vincent Batts --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e894798f0..bb69ace03 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ DOC_FILES := \ runtime-config.md \ runtime-config-linux.md \ glossary.md +EPOCH_TEST_COMMIT := 041eb73d2e0391463894c04c8ac938036143eba3 docs: pdf html .PHONY: docs @@ -43,7 +44,7 @@ html: .PHONY: test .govet .golint .gitvalidation -test: .govet .golint +test: .govet .golint .gitvalidation # `go get golang.org/x/tools/cmd/vet` .govet: @@ -55,7 +56,7 @@ test: .govet .golint # `go get github.com/vbatts/git-validation` .gitvalidation: - git-validation -run DCO,short-subject -v -range ${TRAVIS_COMMIT_RANGE} + git-validation -q -run DCO,short-subject -v -range $(EPOCH_TEST_COMMIT)..HEAD clean: rm -rf output/ *~