Added target to run an individual test on the docker image.

This commit is contained in:
Salvador E. Tropea 2020-10-17 12:01:12 -03:00
parent e3ae5e6284
commit dfc1b8e9be
1 changed files with 10 additions and 0 deletions

View File

@ -63,6 +63,16 @@ test1:
#@echo "********************" Error
#@cat output/*/error.txt
test_docker_local_1:
rm -rf output
$(PY_COV) erase
# Run in the same directory to make the __pycache__ valid
# Also change the owner of the files to the current user (we run as root like in GitHub)
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest \
/bin/bash -c "flake8 . --count --statistics ; pytest-3 --log-cli-level debug -k 'test_import_no_fail' --test_dir output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/"
$(PY_COV) report
x-www-browser htmlcov/index.html
test_docker_local:
rm -rf output
$(PY_COV) erase