Files
docker-cli/components/engine/project/make/test-docker-py
Tianon Gravi 241c2f0465 Tweak test-docker-py feature
- move docker/docker-py clone to the Dockerfile
- put "integration test daemon startup" code in a separate file for both scripts to source
- add new test-docker-py Makefile target
- include "python-websocket" package in Dockerfile for running the tests

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 100267de81985bbf3b976bfde850def89487dc11
Component: engine
2014-12-19 10:47:01 -07:00

23 lines
506 B
Bash

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