integration: add variable to set storage options for testing
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
This commit is contained in:
parent
dd614b5e34
commit
30f3bd643d
1
Makefile
1
Makefile
|
@ -8,6 +8,7 @@ DOCKER_ENVS := \
|
||||||
-e DOCKER_CLIENTONLY \
|
-e DOCKER_CLIENTONLY \
|
||||||
-e DOCKER_EXECDRIVER \
|
-e DOCKER_EXECDRIVER \
|
||||||
-e DOCKER_GRAPHDRIVER \
|
-e DOCKER_GRAPHDRIVER \
|
||||||
|
-e DOCKER_STORAGE_OPTS \
|
||||||
-e TESTDIRS \
|
-e TESTDIRS \
|
||||||
-e TESTFLAGS \
|
-e TESTFLAGS \
|
||||||
-e TIMEOUT
|
-e TIMEOUT
|
||||||
|
|
|
@ -16,6 +16,16 @@ export DOCKER_GRAPHDRIVER=${DOCKER_GRAPHDRIVER:-vfs}
|
||||||
export DOCKER_EXECDRIVER=${DOCKER_EXECDRIVER:-native}
|
export DOCKER_EXECDRIVER=${DOCKER_EXECDRIVER:-native}
|
||||||
export DOCKER_USERLANDPROXY=${DOCKER_USERLANDPROXY:-true}
|
export DOCKER_USERLANDPROXY=${DOCKER_USERLANDPROXY:-true}
|
||||||
|
|
||||||
|
# example usage: DOCKER_STORAGE_OPTS="dm.basesize=20G,dm.loopdatasize=200G"
|
||||||
|
storage_params=""
|
||||||
|
if [ -n "$DOCKER_STORAGE_OPTS" ]; then
|
||||||
|
IFS=','
|
||||||
|
for i in ${DOCKER_STORAGE_OPTS}; do
|
||||||
|
storage_params="--storage-opt $i $storage_params"
|
||||||
|
done
|
||||||
|
unset IFS
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$DOCKER_TEST_HOST" ]; then
|
if [ -z "$DOCKER_TEST_HOST" ]; then
|
||||||
export DOCKER_HOST="unix://$(cd "$DEST" && pwd)/docker.sock" # "pwd" tricks to make sure $DEST is an absolute path, not a relative one
|
export DOCKER_HOST="unix://$(cd "$DEST" && pwd)/docker.sock" # "pwd" tricks to make sure $DEST is an absolute path, not a relative one
|
||||||
( set -x; exec \
|
( set -x; exec \
|
||||||
|
@ -25,6 +35,7 @@ if [ -z "$DOCKER_TEST_HOST" ]; then
|
||||||
--exec-driver "$DOCKER_EXECDRIVER" \
|
--exec-driver "$DOCKER_EXECDRIVER" \
|
||||||
--pidfile "$DEST/docker.pid" \
|
--pidfile "$DEST/docker.pid" \
|
||||||
--userland-proxy="$DOCKER_USERLANDPROXY" \
|
--userland-proxy="$DOCKER_USERLANDPROXY" \
|
||||||
|
$storage_params \
|
||||||
&> "$DEST/docker.log"
|
&> "$DEST/docker.log"
|
||||||
) &
|
) &
|
||||||
trap "source '${MAKEDIR}/.integration-daemon-stop'" EXIT # make sure that if the script exits unexpectedly, we stop this daemon we just started
|
trap "source '${MAKEDIR}/.integration-daemon-stop'" EXIT # make sure that if the script exits unexpectedly, we stop this daemon we just started
|
||||||
|
|
Loading…
Reference in New Issue