From d46d5178b557458757d17314cd58112c67d75457 Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Wed, 16 Sep 2015 10:51:13 -0700 Subject: [PATCH] Make integration-tests an indipendent target - Also add target for cleaning up dnet binary Signed-off-by: Alessandro Boch --- libnetwork/Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libnetwork/Makefile b/libnetwork/Makefile index 1cbccbf3c0..15ece669f9 100644 --- a/libnetwork/Makefile +++ b/libnetwork/Makefile @@ -1,4 +1,4 @@ -.PHONY: all all-local build build-local check check-code check-format run-tests check-local integration-tests install-deps coveralls circle-ci start-services +.PHONY: all all-local build build-local check check-code check-format run-tests check-local integration-tests install-deps coveralls circle-ci start-services clean SHELL=/bin/bash build_image=libnetwork-build dockerargs = --privileged -v $(shell pwd):/go/src/github.com/docker/libnetwork -w /go/src/github.com/docker/libnetwork @@ -7,9 +7,9 @@ docker = docker run --rm -it ${dockerargs} ${container_env} ${build_image} ciargs = -e "COVERALLS_TOKEN=$$COVERALLS_TOKEN" -e "INSIDECONTAINER=-incontainer=true" cidocker = docker run ${ciargs} ${dockerargs} golang:1.4 -all: ${build_image}.created build check integration-tests +all: ${build_image}.created build check integration-tests clean -integration-tests: +integration-tests: ./cmd/dnet/dnet @if [ ! -d ./integration-tmp ]; then \ mkdir -p ./integration-tmp; \ git clone https://github.com/sstephenson/bats.git ./integration-tmp/bats; \ @@ -17,6 +17,15 @@ integration-tests: fi @./integration-tmp/bin/bats ./test/integration/dnet +./cmd/dnet/dnet: + make build-local + +clean: + @if [ -e ./cmd/dnet/dnet ]; then \ + echo "Removing dnet binary"; \ + rm -rf ./cmd/dnet/dnet; \ + fi + all-local: check-local build-local ${build_image}.created: