summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2014-02-03 14:44:47 +0100
committerhut <hut@lepus.uberspace.de>2014-02-03 14:46:21 +0100
commitf473be92d270654c67e0eb4fc8c17a5be99e29b2 (patch)
tree79b59017c54db55f9209f4a92f8a4d3866ac6fed /Makefile
parent1bf58392c6b26d9e6d4c5886a51c94d2526cd767 (diff)
downloadranger-f473be92d270654c67e0eb4fc8c17a5be99e29b2.tar.gz
Makefile: allow selecting files for "make test" by setting $FILTER
For example:

FILTER=signals make test

will test only files that match "signals", i.e. only
ranger/ext/signals.py.  FILTER is passed as a pattern directly to grep.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 109d9f2a..0a79142e 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ SETUPOPTS ?= '--record=install_log.txt'
 DOCDIR ?= doc/pydoc
 DESTDIR ?= /
 PYOPTIMIZE ?= 1
+FILTER ?= .
 
 CWD = $(shell pwd)
 
@@ -60,7 +61,7 @@ doc: cleandoc
 	find . -name \*.html -exec sed -i 's|'$(CWD)'|../..|g' -- {} \;
 
 test:
-	@for FILE in $(shell grep -IHm 1 doctest -r ranger | cut -d: -f1); do \
+	@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