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/cpp_tests/font_registration_test
|
||||||
tests/python_tests/raster_colorizer_test.png
|
tests/python_tests/raster_colorizer_test.png
|
||||||
tests/python_tests/raster_colorizer_test_save.xml
|
tests/python_tests/raster_colorizer_test_save.xml
|
||||||
utils/mapnik-config/mapnik-config
|
bin/mapnik-config
|
||||||
utils/mapnik-config/mapnik2.pc
|
|
||||||
utils/shapeindex/shapeindex
|
utils/shapeindex/shapeindex
|
||||||
utils/ogrindex/ogrindex
|
utils/ogrindex/ogrindex
|
||||||
utils/pgsql2sqlite/pgsql2sqlite
|
utils/pgsql2sqlite/pgsql2sqlite
|
||||||
|
|
31
Makefile
31
Makefile
|
@ -1,11 +1,5 @@
|
||||||
UNAME := $(shell uname)
|
UNAME := $(shell uname)
|
||||||
LINK_FIX=LD_LIBRARY_PATH
|
OS := $(shell uname -s)
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
LINK_FIX=DYLD_LIBRARY_PATH
|
|
||||||
else
|
|
||||||
endif
|
|
||||||
|
|
||||||
OS:=$(shell uname -s)
|
|
||||||
|
|
||||||
ifeq ($(JOBS),)
|
ifeq ($(JOBS),)
|
||||||
JOBS:=1
|
JOBS:=1
|
||||||
|
@ -49,25 +43,26 @@ uninstall:
|
||||||
@python scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 uninstall
|
@python scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 uninstall
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@ ./run_tests
|
./run_tests
|
||||||
|
|
||||||
test-local:
|
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
|
make test
|
||||||
|
|
||||||
bench:
|
test-visual:
|
||||||
@export ${LINK_FIX}=`pwd`/src:${${LINK_FIX}} && \
|
$(shell source ./localize.sh && python tests/visual_tests/test.py -q)
|
||||||
./benchmark/run
|
|
||||||
|
test-python:
|
||||||
|
$(shell source ./localize.sh && python tests/run_tests.py -q)
|
||||||
|
|
||||||
|
test-cpp:
|
||||||
|
./tests/cpp_tests/run
|
||||||
|
|
||||||
check: test-local
|
check: test-local
|
||||||
|
|
||||||
|
bench:
|
||||||
|
LOCALIZE=true ./benchmark/run
|
||||||
|
|
||||||
demo:
|
demo:
|
||||||
@echo "*** Running rundemo.cpp…"
|
|
||||||
cd demo/c++; ./rundemo `mapnik-config --prefix`
|
cd demo/c++; ./rundemo `mapnik-config --prefix`
|
||||||
|
|
||||||
pep8:
|
pep8:
|
||||||
|
|
|
@ -2000,7 +2000,7 @@ if not HELP_REQUESTED:
|
||||||
SConscript('benchmark/build.py')
|
SConscript('benchmark/build.py')
|
||||||
|
|
||||||
# install pkg-config script and mapnik-config script
|
# install pkg-config script and mapnik-config script
|
||||||
SConscript('utils/mapnik-config/build.py')
|
SConscript('bin/build.py')
|
||||||
|
|
||||||
# write the viewer.ini file
|
# write the viewer.ini file
|
||||||
SConscript('demo/viewer/build.py')
|
SConscript('demo/viewer/build.py')
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
||||||
cd ../
|
cd ../
|
||||||
|
source ./localize.sh
|
||||||
|
|
||||||
BASE=./benchmark/out
|
BASE=./benchmark/out
|
||||||
function run {
|
function run {
|
||||||
${BASE}/$1 --threads 0 --iterations $3;
|
${BASE}/$1 --threads 0 --iterations $3;
|
||||||
|
|
|
@ -2,16 +2,15 @@
|
||||||
|
|
||||||
failures=0
|
failures=0
|
||||||
|
|
||||||
|
source ./localize.sh
|
||||||
|
|
||||||
echo "*** Running visual tests..."
|
echo "*** Running visual tests..."
|
||||||
python tests/visual_tests/test.py -q
|
python tests/visual_tests/test.py -q
|
||||||
failures=$((failures+$?))
|
failures=$((failures+$?))
|
||||||
|
|
||||||
echo "*** Running C++ tests..."
|
echo "*** Running C++ tests..."
|
||||||
for FILE in tests/cpp_tests/*-bin; do
|
./tests/cpp_tests/run
|
||||||
${FILE} -q -d .;
|
failures=$((failures+$?))
|
||||||
failures=$((failures+$?))
|
|
||||||
done
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "*** Running python tests..."
|
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