Browse code

cli integration: allow driver selection via vars

This makes it possible to choose the graphdriver and the execdriver
which is going to be used for the cli integration tests.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)

unclejack authored on 2014/04/05 01:03:07
Showing 2 changed files
... ...
@@ -10,7 +10,7 @@ DOCKER_IMAGE := docker$(if $(GIT_BRANCH),:$(GIT_BRANCH))
10 10
 DOCKER_DOCS_IMAGE := docker-docs$(if $(GIT_BRANCH),:$(GIT_BRANCH))
11 11
 DOCKER_MOUNT := $(if $(BINDDIR),-v "$(CURDIR)/$(BINDDIR):/go/src/github.com/dotcloud/docker/$(BINDDIR)")
12 12
 
13
-DOCKER_RUN_DOCKER := docker run --rm -it --privileged -e TESTFLAGS $(DOCKER_MOUNT) "$(DOCKER_IMAGE)"
13
+DOCKER_RUN_DOCKER := docker run --rm -it --privileged -e TESTFLAGS -e DOCKER_GRAPHDRIVER -e DOCKER_EXECDRIVER $(DOCKER_MOUNT) "$(DOCKER_IMAGE)"
14 14
 DOCKER_RUN_DOCS := docker run --rm -it -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)"
15 15
 
16 16
 default: binary
... ...
@@ -7,6 +7,8 @@ set -e
7 7
 # subshell so that we can export PATH without breaking other things
8 8
 (
9 9
 export PATH="$DEST/../binary:$DEST/../dynbinary:$PATH"
10
+DOCKER_GRAPHDRIVER=${DOCKER_GRAPHDRIVER:-vfs}
11
+DOCKER_EXECDRIVER=${DOCKER_EXECDRIVER:-native}
10 12
 
11 13
 bundle_test_integration_cli() {
12 14
 	go_test_dir ./integration-cli
... ...
@@ -17,7 +19,8 @@ if ! command -v docker &> /dev/null; then
17 17
 	false
18 18
 fi
19 19
 
20
-docker -d -D -p $DEST/docker.pid &> $DEST/docker.log &
20
+echo "running cli integration tests using graphdriver: '$DOCKER_GRAPHDRIVER' and execdriver: '$DOCKER_EXECDRIVER'" 
21
+docker -d -D -s $DOCKER_GRAPHDRIVER -e $DOCKER_EXECDRIVER -p $DEST/docker.pid &> $DEST/docker.log &
21 22
 
22 23
 # pull the busybox image before running the tests
23 24
 sleep 2