summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-07 18:42:28 +0200
committerhut <hut@lavabit.com>2011-10-07 18:42:28 +0200
commit5fca2a0b63bb565ab4faba135dc1d201c3b05725 (patch)
tree37a3d345a393d75f76fe16a9503a6a4167c50914
parentb8d13fb4df1fbed95ba928495c7dc56eaa008505 (diff)
downloadranger-5fca2a0b63bb565ab4faba135dc1d201c3b05725.tar.gz
Makefile: added `make test' back in.
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5d8ba2f9..f7950392 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ PYOPTIMIZE ?= 1
 
 CWD = $(shell pwd)
 
-default: compile
+default: test compile
 	@echo 'Run `make options` for a list of all options'
 
 options: help
@@ -38,6 +38,7 @@ options: help
 	@echo 'DOCDIR = $(DOCDIR)'
 
 help:
+	@echo 'make:          Test and compile ranger.'
 	@echo 'make install:  Install $(NAME)'
 	@echo 'make clean:    Remove the compiled files (*.pyc, *.pyo)'
 	@echo 'make doc:      Create the pydoc documentation'
@@ -45,6 +46,7 @@ help:
 	@echo 'make man:      Compile the manpage with "pod2man"'
 	@echo 'make manhtml:  Compile the html manpage with "pod2html"'
 	@echo 'make snapshot: Create a tar.gz of the current git revision'
+	@echo 'make test:     Test all testable modules of ranger'
 	@echo 'make todo:     Look for TODO and XXX markers in the source code'
 
 install:
@@ -66,6 +68,12 @@ doc: cleandoc
 		pydoc.writedocs("$(CWD)")'
 	find . -name \*.html -exec sed -i 's|'$(CWD)'|../..|g' -- {} \;
 
+test:
+	@for FILE in $(shell grep -IHm 1 doctest -r ranger | cut -d: -f1); do \
+		echo "Testing $$FILE..."; \
+		${PYTHON} $$FILE; \
+	done
+
 man:
 	pod2man --stderr --center='ranger manual' --date='$(NAME)-$(VERSION)' \
 		--release=$(shell date +%x) doc/ranger.pod doc/ranger.1
f='#n167'>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