aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-01-24 05:42:08 +0100
committernfnty <git@nfnty.se>2017-01-24 05:45:56 +0100
commitc5f776edfa1fe1ddf8027a6acec7b1caee8e9867 (patch)
tree1df9952c2f5d66c56c1448eac16e54183ad28784 /Makefile
parent94dc542c80d56afd2edf9c80e5f4031770920f94 (diff)
downloadranger-c5f776edfa1fe1ddf8027a6acec7b1caee8e9867.tar.gz
Makefile: Split tests
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index cd871d2e..f31053e4 100644
--- a/Makefile
+++ b/Makefile
@@ -67,23 +67,27 @@ TEST_PATHS_MAIN = \
tests
TEST_PATH_CONFIG = ranger/config
-test:
+test_pylint:
@echo "Running pylint..."
pylint $(TEST_PATHS_MAIN)
pylint --rcfile=$(TEST_PATH_CONFIG)/pylintrc $(TEST_PATH_CONFIG)
+
+test_flake8:
@echo "Running flake8..."
flake8 $(TEST_PATHS_MAIN) $(TEST_PATH_CONFIG)
+
+test_doctest:
@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
- @if type 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
+
+test_pytest:
+ echo "Running py.test tests..."
+ py.test tests
+
+test: test_pylint test_flake8 test_doctest test_pytest
@echo "Finished testing."
man: