From c39c839452d296ca63c4f148133220c581c7da82 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 26 Nov 2012 17:48:02 -0800 Subject: [PATCH] add a test-local target to run tests without having to install - closes #1397 --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile b/Makefile index c5ae8cc5d..7fc6e1b0a 100755 --- a/Makefile +++ b/Makefile @@ -1,3 +1,10 @@ +UNAME := $(shell uname) +LINK_FIX=LD_LIBRARY_PATH +ifeq ($(UNAME), Darwin) + LINK_FIX=DYLD_LIBRARY_PATH +else +endif + all: mapnik install: @@ -31,6 +38,14 @@ test: @echo "*** Running python tests..." @python tests/run_tests.py -q +test-local: + @echo "*** boostrapping local test environment..." + export ${LINK_FIX}=`pwd`/src:${${LINK_FIX}} && \ + export PYTHONPATH=`pwd`/bindings/python/:${PYTHONPATH} && \ + export MAPNIK_FONT_DIRECTORY=`pwd`/fonts/dejavu-fonts-ttf-2.33/ttf/ && \ + export MAPNIK_INPUT_PLUGINS_DIRECTORY=`pwd`/plugins/input/ && \ + make test + demo: @echo "*** Running rundemo.cpp…" cd demo/c++; ./rundemo `mapnik-config --prefix`/lib/mapnik