Skip to content

Commit

Permalink
Merge pull request docker#16 from gdevillele/pr-add-test-target
Browse files Browse the repository at this point in the history
add “test” target to makefiles
  • Loading branch information
gdevillele authored Apr 28, 2017
2 parents e8d0ecd + 4d4203f commit 2075433
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}} \
Expand Down
4 changes: 4 additions & 0 deletions docker.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ ENV CGO_ENABLED=0
WORKDIR /go/src/github.com/docker/cli

RUN make cross
RUN make test

CMD sh

0 comments on commit 2075433

Please sign in to comment.