From f0879a1e145f31569e9e4e61f429de858bb636ab Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Sun, 8 Dec 2013 18:41:50 -0700 Subject: [PATCH] Add separate "test-integration" bundlescript (and corresponding dyntest-integration bundlescript) --- Makefile | 2 +- hack/make.sh | 2 ++ hack/make/dyntest-integration | 17 +++++++++++++++++ hack/make/test-integration | 11 +++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 hack/make/dyntest-integration create mode 100644 hack/make/test-integration diff --git a/Makefile b/Makefile index 1518fb1331..02a121dc50 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ doc: docker build -t docker-docs docs && docker run -p 8000:8000 docker-docs test: build - $(DOCKER_RUN_DOCKER) hack/make.sh test + $(DOCKER_RUN_DOCKER) hack/make.sh test test-integration shell: build $(DOCKER_RUN_DOCKER) bash diff --git a/hack/make.sh b/hack/make.sh index 23b77509b6..7b39f3161c 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -35,8 +35,10 @@ grep -q "$RESOLVCONF" /proc/mounts || { DEFAULT_BUNDLES=( binary test + test-integration dynbinary dyntest + dyntest-integration tgz ubuntu ) diff --git a/hack/make/dyntest-integration b/hack/make/dyntest-integration new file mode 100644 index 0000000000..0887c45be0 --- /dev/null +++ b/hack/make/dyntest-integration @@ -0,0 +1,17 @@ +#!/bin/bash + +DEST=$1 +INIT=$DEST/../dynbinary/dockerinit-$VERSION + +set -e + +if [ ! -x "$INIT" ]; then + echo >&2 'error: dynbinary must be run before dyntest-integration' + false +fi + +( + export TEST_DOCKERINIT_PATH="$INIT" + export LDFLAGS_STATIC="-X github.com/dotcloud/docker/utils.INITSHA1 \"$DOCKER_INITSHA1\"" + source "$(dirname "$BASH_SOURCE")/test-integration" +) diff --git a/hack/make/test-integration b/hack/make/test-integration new file mode 100644 index 0000000000..f1ab0b99c3 --- /dev/null +++ b/hack/make/test-integration @@ -0,0 +1,11 @@ +#!/bin/bash + +DEST=$1 + +set -e + +bundle_test_integration() { + LDFLAGS="$LDFLAGS $LDFLAGS_STATIC" go_test_dir ./integration +} + +bundle_test_integration 2>&1 | tee $DEST/test.log