rework tests: always run locally
This commit is contained in:
parent
37eaae3a51
commit
66347f78e6
8 changed files with 39 additions and 26 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -19,8 +19,7 @@ demo/viewer/viewer.ini
|
|||
tests/cpp_tests/font_registration_test
|
||||
tests/python_tests/raster_colorizer_test.png
|
||||
tests/python_tests/raster_colorizer_test_save.xml
|
||||
utils/mapnik-config/mapnik-config
|
||||
utils/mapnik-config/mapnik2.pc
|
||||
bin/mapnik-config
|
||||
utils/shapeindex/shapeindex
|
||||
utils/ogrindex/ogrindex
|
||||
utils/pgsql2sqlite/pgsql2sqlite
|
||||
|
|
29
Makefile
29
Makefile
|
@ -1,10 +1,4 @@
|
|||
UNAME := $(shell uname)
|
||||
LINK_FIX=LD_LIBRARY_PATH
|
||||
ifeq ($(UNAME), Darwin)
|
||||
LINK_FIX=DYLD_LIBRARY_PATH
|
||||
else
|
||||
endif
|
||||
|
||||
OS := $(shell uname -s)
|
||||
|
||||
ifeq ($(JOBS),)
|
||||
|
@ -49,25 +43,26 @@ uninstall:
|
|||
@python scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 uninstall
|
||||
|
||||
test:
|
||||
@ ./run_tests
|
||||
./run_tests
|
||||
|
||||
test-local:
|
||||
@echo "*** Boostrapping local test environment..."
|
||||
@export ${LINK_FIX}=`pwd`/src:${${LINK_FIX}} && \
|
||||
export PATH=`pwd`/utils/mapnik-config/:${PATH} && \
|
||||
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
|
||||
|
||||
bench:
|
||||
@export ${LINK_FIX}=`pwd`/src:${${LINK_FIX}} && \
|
||||
./benchmark/run
|
||||
test-visual:
|
||||
$(shell source ./localize.sh && python tests/visual_tests/test.py -q)
|
||||
|
||||
test-python:
|
||||
$(shell source ./localize.sh && python tests/run_tests.py -q)
|
||||
|
||||
test-cpp:
|
||||
./tests/cpp_tests/run
|
||||
|
||||
check: test-local
|
||||
|
||||
bench:
|
||||
LOCALIZE=true ./benchmark/run
|
||||
|
||||
demo:
|
||||
@echo "*** Running rundemo.cpp…"
|
||||
cd demo/c++; ./rundemo `mapnik-config --prefix`
|
||||
|
||||
pep8:
|
||||
|
|
|
@ -2000,7 +2000,7 @@ if not HELP_REQUESTED:
|
|||
SConscript('benchmark/build.py')
|
||||
|
||||
# install pkg-config script and mapnik-config script
|
||||
SConscript('utils/mapnik-config/build.py')
|
||||
SConscript('bin/build.py')
|
||||
|
||||
# write the viewer.ini file
|
||||
SConscript('demo/viewer/build.py')
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
||||
cd ../
|
||||
source ./localize.sh
|
||||
|
||||
BASE=./benchmark/out
|
||||
function run {
|
||||
${BASE}/$1 --threads 0 --iterations $3;
|
||||
|
|
|
@ -2,16 +2,15 @@
|
|||
|
||||
failures=0
|
||||
|
||||
source ./localize.sh
|
||||
|
||||
echo "*** Running visual tests..."
|
||||
python tests/visual_tests/test.py -q
|
||||
failures=$((failures+$?))
|
||||
|
||||
echo "*** Running C++ tests..."
|
||||
for FILE in tests/cpp_tests/*-bin; do
|
||||
${FILE} -q -d .;
|
||||
./tests/cpp_tests/run
|
||||
failures=$((failures+$?))
|
||||
done
|
||||
|
||||
echo
|
||||
|
||||
echo "*** Running python tests..."
|
||||
|
|
18
tests/cpp_tests/run
Executable file
18
tests/cpp_tests/run
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
||||
cd ../../
|
||||
source ./localize.sh
|
||||
|
||||
failures=0
|
||||
if [ -n "$(find tests/cpp_tests/ -maxdepth 1 -name '*-bin' -print -quit)" ]; then
|
||||
for FILE in tests/cpp_tests/*-bin; do
|
||||
${FILE} -q -d .;
|
||||
failures=$((failures+$?))
|
||||
done
|
||||
echo
|
||||
else
|
||||
echo 'warning: no c++ tests found'
|
||||
fi
|
||||
exit $failures
|
||||
|
Loading…
Reference in a new issue