From ab36f62d593c4597cf2cc115187bdb5a95652883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Sat, 19 Mar 2016 10:14:36 +0100 Subject: [PATCH] Add 'test-unit' and 'test-unit-local' Makefile targets Running unit tests without the integration tests is non-trivial, so add a Makefile target to help with this. --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index a0acf950..3fa942b9 100644 --- a/Makefile +++ b/Makefile @@ -54,5 +54,12 @@ shell: build-container test-integration: build-container $(DOCKER_RUN_DOCKER) hack/make.sh test-integration +test-unit: build-container + # Just call (make test unit-local) here instead of worrying about environment differences, e.g. GO15VENDOREXPERIMENT. + $(DOCKER_RUN_DOCKER) make test-unit-local + validate: build-container $(DOCKER_RUN_DOCKER) hack/make.sh validate-git-marks validate-gofmt validate-lint validate-vet + +test-unit-local: + go test $$(go list -e ./... | grep -v '^github\.com/projectatomic/skopeo/\(integration\|vendor/.*\)$$')