X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=24e5b158ef90b3b6483e29226ed03dafa93095bc;hb=7e3f07daf215038b5472497aad558d23ed69ddec;hp=cc56b5efa139745e6e4039b42fb0a328a40c47e1;hpb=4f7387b9c2f8e427bff72a05dc547730937a242a;p=nepi.git diff --git a/Makefile b/Makefile index cc56b5ef..24e5b158 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ SRCDIR = $(CURDIR)/src TESTDIR = $(CURDIR)/test +TESTLIB = $(TESTDIR)/lib BUILDDIR = $(CURDIR)/build DISTDIR = $(CURDIR)/dist @@ -16,15 +17,15 @@ else BUILDDIR := $(BUILDDIR)/lib endif -PYPATH = $(BUILDDIR):$(PYTHONPATH) +PYPATH = $(BUILDDIR):$(TESTLIB):$(PYTHONPATH) COVERAGE = $(or $(shell which coverage), $(shell which python-coverage), \ coverage) -all: - ./setup.py build +all: clean + PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" ./setup.py build install: all - ./setup.py install + PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" ./setup.py install test: all retval=0; \ @@ -33,6 +34,10 @@ test: all PYTHONPATH="$(PYPATH)" $$i -v || retval=$$?; \ done; exit $$retval +test-one: all + echo $(file) $(case) + PYTHONPATH="$(PYPATH)" python $(file) $(case) + coverage: all rm -f .coverage for i in `find "$(TESTDIR)" -perm -u+x -type f`; do \ @@ -44,8 +49,8 @@ coverage: all rm -f .coverage clean: - ./setup.py clean rm -f `find -name \*.pyc` .coverage *.pcap + rm -rf "$(BUILDDIR)" distclean: clean rm -rf "$(DISTDIR)"