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
|
|
|
|
|
2015-03-18 01:01:36 +01:00
|
|
|
>&2 echo "Validating DCO"
|
|
|
|
script/validate-dco
|
|
|
|
|
2015-02-25 14:52:55 +01:00
|
|
|
>&2 echo "Running lint checks"
|
2015-03-26 07:15:34 +01:00
|
|
|
flake8
|
2015-02-25 14:52:55 +01:00
|
|
|
|
|
|
|
if [ "$DOCKER_VERSIONS" == "" ]; then
|
2015-03-23 22:41:53 +01:00
|
|
|
DOCKER_VERSIONS="1.5.0"
|
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:41:53 +01:00
|
|
|
docker-1.5.0 run \
|
2015-02-25 14:52:55 +01:00
|
|
|
--rm \
|
|
|
|
--privileged \
|
|
|
|
--volume="/var/lib/docker" \
|
|
|
|
-e "DOCKER_VERSION=$version" \
|
|
|
|
--entrypoint="script/dind" \
|
|
|
|
"$TAG" \
|
|
|
|
script/wrapdocker nosetests "$@"
|
|
|
|
done
|