Merge pull request #16 from gdevillele/pr-add-test-target

add “test” target to makefiles
This commit is contained in:
Gaetan 2017-04-28 10:47:51 -07:00 committed by GitHub
commit 2075433f95
3 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,11 @@ build: clean
clean:
@rm -rf ./build
# run go test
# the "-tags daemon" part is temporary
test:
@go test -tags daemon -v $(shell go list ./... | grep -v /vendor/)
# build the CLI for multiple architectures
cross: clean
@gox -output build/docker-{{.OS}}-{{.Arch}} \

View File

@ -21,6 +21,10 @@ build: build_docker_image
clean: build_docker_image
@docker run --rm -v `pwd`:/go/src/github.com/docker/cli $(DEV_DOCKER_IMAGE_NAME) make clean
# run go test
test: build_docker_image
@docker run --rm -v `pwd`:/go/src/github.com/docker/cli $(DEV_DOCKER_IMAGE_NAME) make test
# build the CLI for multiple architectures using a container
cross: build_docker_image
@docker run --rm -v `pwd`:/go/src/github.com/docker/cli $(DEV_DOCKER_IMAGE_NAME) make cross

View File

@ -25,5 +25,6 @@ ENV CGO_ENABLED=0
WORKDIR /go/src/github.com/docker/cli
RUN make cross
RUN make test
CMD sh