diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/README | 12 | ||||
| -rwxr-xr-x | test/run_all_docker_test.sh | 13 | ||||
| -rw-r--r-- | test/run_all_versions.py (renamed from test/run.py) | 0 |
3 files changed, 17 insertions, 8 deletions
diff --git a/test/README b/test/README index 12d4e4f..c34cb6a 100644 --- a/test/README +++ b/test/README @@ -1,10 +1,6 @@ -To run the tests across a selection of Ubuntu LTS versions: +There are a few ways to run the python-magic tests -docker build -t "python_magic/xenial:latest" -f test/Dockerfile_xenial . -docker build -t "python_magic/bionic:latest" -f test/Dockerfile_bionic . -docker build -t "python_magic/focal:latest" -f test/Dockerfile_focal . - -docker run python_magic/xenial:latest -docker run python_magic/bionic:latest -docker run python_magic/focal:latest + 1. `pytest` will run the test suite against your default version of python + 2. `./test/run_all_versions.py` will run the tests against all installed versions of python. + 3. `./test/run_all_docker_test.sh` will run against a variety of different Linux distributions, using docker. diff --git a/test/run_all_docker_test.sh b/test/run_all_docker_test.sh new file mode 100755 index 0000000..68a2808 --- /dev/null +++ b/test/run_all_docker_test.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e +set -x + +ROOT=$(dirname $0)/.. +cd $ROOT + +for f in test/docker/*; do + H=$(docker build -q -f ${f} .) + docker run --rm $H +done + diff --git a/test/run.py b/test/run_all_versions.py index cf62eee..cf62eee 100644 --- a/test/run.py +++ b/test/run_all_versions.py |
