Permalink
Browse files

Add collective test targets:

- (make check): GNU coding standards-compliant primary entry point,
  running all available tests in the best environment (i.e. Docker
  container).
- (make test-all-local): Local entry point, running only tests
  which do not require a special environment; intended for IDE
  integration and quick turnaround cycles.

Also modifies the Travis configuration to run (make check), to prevent
duplication.
  • Loading branch information...
1 parent a4fd447 commit b815271f168334a872ca54be451c75c8374d1dc6 @mtrmac mtrmac committed Mar 21, 2016
Showing with 9 additions and 3 deletions.
  1. +1 −3 .travis.yml
  2. +8 −0 Makefile
View
@@ -7,6 +7,4 @@ notifications:
email: false
script:
- - make validate
- - make test-unit
- - make test-integration
+ - make check
View
@@ -51,6 +51,8 @@ man:
shell: build-container
$(DOCKER_RUN_DOCKER) bash
+check: validate test-unit test-integration
+
test-integration: build-container
$(DOCKER_RUN_DOCKER) hack/make.sh test-integration
@@ -61,5 +63,11 @@ test-unit: build-container
validate: build-container
$(DOCKER_RUN_DOCKER) hack/make.sh validate-git-marks validate-gofmt validate-lint validate-vet
+# This target is only intended for development, e.g. executing it from an IDE. Use (make test) for CI or pre-release testing.
+test-all-local: validate-local test-unit-local
+
+validate-local:
+ 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/.*\)$$')

0 comments on commit b815271

Please sign in to comment.