From 62c7a60ad48a6eba091eb42cb3152daf3be67e94 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 22 Jul 2020 17:44:43 -0300 Subject: [PATCH] Added Makefile target to run a single test. --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3bce6b13..c82a7458 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ #!/usr/bin/make PY_COV=python3-coverage +PYTEST=pytest-3 REFDIR=tests/reference/ REFILL=tests/board_samples/zone-refill.kicad_pcb CWD := $(abspath $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))) @@ -21,14 +22,14 @@ lint: doc test: lint $(PY_COV) erase - pytest-3 + $(PYTEST) $(PY_COV) report test_local: lint rm -rf output rm -f example.kiplot.yaml $(PY_COV) erase - pytest-3 --test_dir output + $(PYTEST) --test_dir output $(PY_COV) report $(PY_COV) html x-www-browser htmlcov/index.html @@ -44,6 +45,15 @@ test_docker_local: $(PY_COV) html x-www-browser htmlcov/index.html +single_test: + rm -rf pp + -$(PYTEST) --log-cli-level debug -k "$(SINGLE_TEST)" --test_dir pp + @echo "********************" Output + @cat pp/*/output.txt + @echo "********************" Error + @cat pp/*/error.txt + @rm -f tests/input_samples/bom.ini + deb_clean: fakeroot debian/rules clean