mirror of
				https://github.com/docker/compose.git
				synced 2025-10-31 19:24:21 +01:00 
			
		
		
		
	Prints out results on console and puts HTML report in `coverage-html`. Signed-off-by: Ben Firshman <ben@firshman.co.uk>
		
			
				
	
	
		
			28 lines
		
	
	
		
			847 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			847 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/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"
 | |
| flake8 compose tests setup.py
 | |
| 
 | |
| if [ "$DOCKER_VERSIONS" == "" ]; then
 | |
|   DOCKER_VERSIONS="default"
 | |
| elif [ "$DOCKER_VERSIONS" == "all" ]; then
 | |
|   DOCKER_VERSIONS="$ALL_DOCKER_VERSIONS"
 | |
| fi
 | |
| 
 | |
| for version in $DOCKER_VERSIONS; do
 | |
|   >&2 echo "Running tests against Docker $version"
 | |
|   docker run \
 | |
|     --rm \
 | |
|     --privileged \
 | |
|     --volume="/var/lib/docker" \
 | |
|     --volume="${COVERAGE_DIR:-$(pwd)/coverage-html}:/code/coverage-html" \
 | |
|     -e "DOCKER_VERSION=$version" \
 | |
|     --entrypoint="script/dind" \
 | |
|     "$TAG" \
 | |
|     script/wrapdocker nosetests --with-coverage --cover-branches --cover-package=compose --cover-erase --cover-html-dir=coverage-html --cover-html "$@"
 | |
| done
 |