From c216901aef4380d9f0d06d4c5545c2983fc244ef Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 28 Feb 2016 16:47:51 +0100 Subject: Makefile: Don't fail build when py.test is not installed --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 71899dcd..5de061ff 100644 --- a/Makefile +++ b/Makefile @@ -61,11 +61,18 @@ doc: cleandoc find . -name \*.html -exec sed -i 's|'"$(CWD)"'|../..|g' -- {} \; test: + @echo "Running doctests..." @for FILE in $(shell grep -IHm 1 doctest -r ranger | grep $(FILTER) | cut -d: -f1); do \ echo "Testing $$FILE..."; \ RANGER_DOCTEST=1 PYTHONPATH=".:"$$PYTHONPATH ${PYTHON} $$FILE; \ done - py.test tests + @if type -t py.test > /dev/null; then \ + echo "Running py.test tests..."; \ + py.test tests; \ + else \ + echo "WARNING: Couldn't run some tests because py.test is not installed!"; \ + fi + @echo "Finished testing." man: pod2man --stderr --center='ranger manual' --date='$(NAME)-$(VERSION)' \ -- cgit 1.4.1-2-gfad0