summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2016-02-28 16:47:51 +0100
committerhut <hut@lepus.uberspace.de>2016-02-28 16:51:17 +0100
commitc216901aef4380d9f0d06d4c5545c2983fc244ef (patch)
tree5cc1ca65a4a2e316dc0b65269c650d877e8c0f33
parentcddce56b95823b3087f8ff6682dcfe0640039666 (diff)
downloadranger-c216901aef4380d9f0d06d4c5545c2983fc244ef.tar.gz
Makefile: Don't fail build when py.test is not installed
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
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)' \