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
/a> 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213