2015-02-25 14:52:55 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# This should be run inside a container built from the Dockerfile
|
|
|
|
# at the root of the repo - script/test will do it automatically.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
>&2 echo "Running lint checks"
|
2015-03-26 17:09:15 +01:00
|
|
|
flake8 compose tests setup.py
|
2015-02-25 14:52:55 +01:00
|
|
|
|
|
|
|
if [ "$DOCKER_VERSIONS" == "" ]; then
|
2015-03-31 22:04:22 +02:00
|
|
|
DOCKER_VERSIONS="default"
|
2015-02-25 14:52:55 +01:00
|
|
|
elif [ "$DOCKER_VERSIONS" == "all" ]; then
|
|
|
|
DOCKER_VERSIONS="$ALL_DOCKER_VERSIONS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
for version in $DOCKER_VERSIONS; do
|
|
|
|
>&2 echo "Running tests against Docker $version"
|
2015-03-23 22:16:14 +01:00
|
|
|
docker run \
|
2015-02-25 14:52:55 +01:00
|
|
|
--rm \
|
|
|
|
--privileged \
|
|
|
|
--volume="/var/lib/docker" \
|
2015-05-28 20:02:19 +02:00
|
|
|
--volume="${COVERAGE_DIR:-$(pwd)/coverage-html}:/code/coverage-html" \
|
2015-02-25 14:52:55 +01:00
|
|
|
-e "DOCKER_VERSION=$version" \
|
2015-08-12 16:36:10 +02:00
|
|
|
-e "DOCKER_DAEMON_ARGS" \
|
2015-02-25 14:52:55 +01:00
|
|
|
--entrypoint="script/dind" \
|
|
|
|
"$TAG" \
|
2015-05-28 20:02:19 +02:00
|
|
|
script/wrapdocker nosetests --with-coverage --cover-branches --cover-package=compose --cover-erase --cover-html-dir=coverage-html --cover-html "$@"
|
2015-02-25 14:52:55 +01:00
|
|
|
done
|