diff --git a/hack/make/.integration-daemon-setup b/hack/make/.integration-daemon-setup new file mode 100644 index 0000000000..ab9d45c32c --- /dev/null +++ b/hack/make/.integration-daemon-setup @@ -0,0 +1,5 @@ +#!/bin/bash + +bundle .ensure-emptyfs +bundle .ensure-frozen-images +bundle .ensure-httpserver diff --git a/hack/make/.integration-daemon-start b/hack/make/.integration-daemon-start index ba1d47bc69..9655f58335 100644 --- a/hack/make/.integration-daemon-start +++ b/hack/make/.integration-daemon-start @@ -49,7 +49,8 @@ if [ -z "$DOCKER_TEST_HOST" ]; then $storage_params \ &> "$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 + # make sure that if the script exits unexpectedly, we stop this daemon we just started + trap 'bundle .integration-daemon-stop' EXIT else export DOCKER_HOST="$DOCKER_TEST_HOST" fi diff --git a/hack/make/build-deb b/hack/make/build-deb index 90f96bd54e..19555acc26 100644 --- a/hack/make/build-deb +++ b/hack/make/build-deb @@ -4,8 +4,7 @@ set -e # subshell so that we can export PATH and TZ without breaking other things ( export TZ=UTC # make sure our "date" variables are UTC-based - - source "${MAKEDIR}/.integration-daemon-start" + bundle .integration-daemon-start # TODO consider using frozen images for the dockercore/builder-deb tags @@ -63,5 +62,5 @@ set -e docker rmi "$tempImage" done - source "${MAKEDIR}/.integration-daemon-stop" + bundle .test-integration-stop ) 2>&1 | tee -a "$DEST/test.log" diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index cbd59adddb..ad8877877f 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -3,7 +3,7 @@ set -e # subshell so that we can export PATH without breaking other things ( - source "${MAKEDIR}/.integration-daemon-start" + bundle .integration-daemon-start dockerPy='/docker-py' [ -d "$dockerPy" ] || { @@ -14,5 +14,5 @@ set -e # exporting PYTHONPATH to import "docker" from our local docker-py test_env PYTHONPATH="$dockerPy" python "$dockerPy/tests/integration_test.py" - source "${MAKEDIR}/.integration-daemon-stop" + bundle .integration-daemon-stop ) 2>&1 | tee -a "$DEST/test.log" diff --git a/hack/make/test-integration-cli b/hack/make/test-integration-cli index 61d62f160a..1861b2222e 100644 --- a/hack/make/test-integration-cli +++ b/hack/make/test-integration-cli @@ -7,13 +7,11 @@ bundle_test_integration_cli() { # subshell so that we can export PATH without breaking other things ( - source "${MAKEDIR}/.integration-daemon-start" + bundle .integration-daemon-start - source "${MAKEDIR}/.ensure-frozen-images" - source "${MAKEDIR}/.ensure-httpserver" - source "${MAKEDIR}/.ensure-emptyfs" + bundle .integration-daemon-setup bundle_test_integration_cli - source "${MAKEDIR}/.integration-daemon-stop" + bundle .integration-daemon-stop ) 2>&1 | tee -a "$DEST/test.log"