Skip to content

Commit 62b08f5

Browse files
committed
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 <[email protected]> (github: unclejack)
1 parent 031e288 commit 62b08f5

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ DOCKER_IMAGE := docker$(if $(GIT_BRANCH),:$(GIT_BRANCH))
1010
DOCKER_DOCS_IMAGE := docker-docs$(if $(GIT_BRANCH),:$(GIT_BRANCH))
1111
DOCKER_MOUNT := $(if $(BINDDIR),-v "$(CURDIR)/$(BINDDIR):/go/src/github.com/dotcloud/docker/$(BINDDIR)")
1212

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)"
1414
DOCKER_RUN_DOCS := docker run --rm -it -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)"
1515

1616
default: binary

hack/make/test-integration-cli

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set -e
77
# subshell so that we can export PATH without breaking other things
88
(
99
export PATH="$DEST/../binary:$DEST/../dynbinary:$PATH"
10+
DOCKER_GRAPHDRIVER=${DOCKER_GRAPHDRIVER:-vfs}
11+
DOCKER_EXECDRIVER=${DOCKER_EXECDRIVER:-native}
1012

1113
bundle_test_integration_cli() {
1214
go_test_dir ./integration-cli
@@ -17,7 +19,8 @@ if ! command -v docker &> /dev/null; then
1719
false
1820
fi
1921

20-
docker -d -D -p $DEST/docker.pid &> $DEST/docker.log &
22+
echo "running cli integration tests using graphdriver: '$DOCKER_GRAPHDRIVER' and execdriver: '$DOCKER_EXECDRIVER'"
23+
docker -d -D -s $DOCKER_GRAPHDRIVER -e $DOCKER_EXECDRIVER -p $DEST/docker.pid &> $DEST/docker.log &
2124

2225
# pull the busybox image before running the tests
2326
sleep 2

0 commit comments

Comments
 (0)