2015-04-27 00:45:12 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
failures=0
|
|
|
|
|
2015-04-30 16:41:16 +02:00
|
|
|
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
|
|
|
cd ../
|
2015-04-27 00:45:12 +02:00
|
|
|
source ./localize.sh
|
2015-04-30 16:31:45 +02:00
|
|
|
|
2015-04-30 16:41:16 +02:00
|
|
|
function run_step { >&2 echo -e "\033[1m\033[34m* $1\033[0m"; }
|
|
|
|
function run_substep { >&2 echo -e "\033[1m\033[36m* $1\033[0m"; }
|
|
|
|
function run_success { >&2 echo -e "\033[1m\033[32m* $1\033[0m"; }
|
|
|
|
|
|
|
|
run_step "Starting Mapnik tests"
|
2015-04-30 16:31:45 +02:00
|
|
|
# mapnik-settings.env is an optional file to store
|
|
|
|
# environment variables that should be used before
|
|
|
|
# running tests like PROJ_LIB, GDAL_DATA, and ICU_DATA
|
|
|
|
# These do not normally need to be set except when
|
|
|
|
# building against binary versions of dependencies like
|
|
|
|
# done via bootstrap.sh
|
|
|
|
if [[ -f mapnik-settings.env ]]; then
|
2015-04-30 16:41:16 +02:00
|
|
|
run_substep "Inheriting from mapnik-settings.env"
|
2015-04-30 16:31:45 +02:00
|
|
|
source mapnik-settings.env
|
|
|
|
fi
|
2015-04-27 00:45:12 +02:00
|
|
|
|
2015-04-30 16:41:16 +02:00
|
|
|
run_substep "Running C++ Unit tests..."
|
2015-04-27 00:45:12 +02:00
|
|
|
./test/unit/run
|
|
|
|
failures=$((failures+$?))
|
|
|
|
|
2015-04-30 16:41:16 +02:00
|
|
|
run_substep "Running standalone C++ tests..."
|
2015-04-27 00:45:12 +02:00
|
|
|
if [ -n "$(find test/standalone/ -maxdepth 1 -name '*-bin' -print -quit)" ]; then
|
|
|
|
for FILE in test/standalone/*-bin; do
|
|
|
|
${FILE};
|
|
|
|
failures=$((failures+$?))
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit $failures
|