Skip to content

Commit

Permalink
Merge pull request containers#19 from mtrmac/unit-tests
Browse files Browse the repository at this point in the history
Add infrastructure for running unit tests
  • Loading branch information
runcom committed Mar 22, 2016
2 parents fde4c74 + b815271 commit ffcb8f8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ notifications:
email: false

script:
- make validate
- make test-integration
- make check
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,23 @@ 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

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

# 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 ffcb8f8

Please sign in to comment.