[mousetrap/gnome3-wip: 219/240] Add support for nosetests.



commit 543a0284cce921e86ecd2bb00ddf6fa622ec39e7
Author: Stoney Jackson <dr stoney gmail com>
Date:   Mon Jun 30 13:02:27 2014 -0400

    Add support for nosetests.

 Makefile.am |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index ab4d36a..28dff9c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -123,8 +123,15 @@ MT_BUILD_HOME = $(shell dirname $(shell find "$(builddir)/build" -mindepth 2 -ma
 MT_BUILD_TESTS = $(shell find "$(MT_BUILD_HOME)/mousetrap" -name "run_python_tests.py")
 
 check-local:
-       PYTHONPATH=$(MT_BUILD_HOME) \
-       $(PYTHON) $(MT_BUILD_TESTS)
+       if command -v nosetests >/dev/null 2>&1 ; then \
+               cd "$(MT_BUILD_HOME)" ; \
+               PYTHONPATH="$(MT_BUILD_HOME)" \
+                       nosetests --with-coverage --cover-package=mousetrap \
+                               --exclude=".*run_python_tests.py"; \
+       else \
+               PYTHONPATH="$(MT_BUILD_HOME)" \
+                       "$(PYTHON)" "$(MT_BUILD_TESTS)"; \
+       fi
 
 
 ##############################################################################


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]