1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/make/test-docker-py
Jörg Thalheim 2b4facdf2e hack: explicit bundles for integration-cli prequisites
no longer load hide critical code such as in .integration-daemon-{start,stop},
if this step failed, it will had logged the corresponding module before:

---> Making bundle: .integration-daemon-start (in bundles/1.7.0-dev/daemon-start)

which is nicer to debug.

This will make it also easier to execute a single tests in an interactive shell.

$ make shell
docker> . hack/make.sh binary .integration-daemon-start .integration-daemon-setup
docker> docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED STATUS              PORTS               NAMES
docker> go test github.com/docker/docker/integration-cli

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-06-09 07:22:26 +02:00

18 lines
483 B
Bash

#!/bin/bash
set -e
# subshell so that we can export PATH without breaking other things
(
bundle .integration-daemon-start
dockerPy='/docker-py'
[ -d "$dockerPy" ] || {
dockerPy="$DEST/docker-py"
git clone https://github.com/docker/docker-py.git "$dockerPy"
}
# exporting PYTHONPATH to import "docker" from our local docker-py
test_env PYTHONPATH="$dockerPy" python "$dockerPy/tests/integration_test.py"
bundle .integration-daemon-stop
) 2>&1 | tee -a "$DEST/test.log"