From dfc1b8e9be96937058e59be35346ba1901496ddb Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Sat, 17 Oct 2020 12:01:12 -0300 Subject: [PATCH] Added target to run an individual test on the docker image. --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index b3b726fe..c132480e 100644 --- a/Makefile +++ b/Makefile @@ -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