test-versions 694 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. # This should be run inside a container built from the Dockerfile
  3. # at the root of the repo - script/test will do it automatically.
  4. set -e
  5. >&2 echo "Validating DCO"
  6. script/validate-dco
  7. >&2 echo "Running lint checks"
  8. flake8 compose
  9. if [ "$DOCKER_VERSIONS" == "" ]; then
  10. DOCKER_VERSIONS="dev"
  11. elif [ "$DOCKER_VERSIONS" == "all" ]; then
  12. DOCKER_VERSIONS="$ALL_DOCKER_VERSIONS"
  13. fi
  14. for version in $DOCKER_VERSIONS; do
  15. >&2 echo "Running tests against Docker $version"
  16. docker-$version run \
  17. --rm \
  18. --privileged \
  19. --volume="/var/lib/docker" \
  20. -e "DOCKER_VERSION=$version" \
  21. --entrypoint="script/dind" \
  22. "$TAG" \
  23. script/wrapdocker nosetests "$@"
  24. done