2015-04-26 22:45:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
failures=0
|
|
|
|
|
2015-04-30 14:41:16 +00:00
|
|
|
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
|
|
|
cd ../
|
2015-04-26 22:45:12 +00:00
|
|
|
source ./localize.sh
|
2015-04-30 14:31:45 +00:00
|
|
|
|
2015-04-30 14:41:16 +00: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-26 22:45:12 +00:00
|
|
|
|
2015-05-22 16:52:01 +00:00
|
|
|
if [ -d "test/data" ]; then
|
2015-04-26 22:45:12 +00:00
|
|
|
|
2015-05-22 16:52:01 +00:00
|
|
|
run_substep "Running C++ Unit tests..."
|
|
|
|
./test/unit/run
|
2015-05-22 17:02:52 +00:00
|
|
|
failures=$((failures+$?))
|
2015-05-22 16:52:01 +00:00
|
|
|
|
|
|
|
run_substep "Running standalone C++ tests..."
|
|
|
|
if [ -n "$(find test/standalone/ -maxdepth 1 -name '*-bin' -print -quit)" ]; then
|
|
|
|
for FILE in test/standalone/*-bin; do
|
|
|
|
${FILE};
|
|
|
|
failures=$((failures+$?))
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "test/data-visual/styles" ]; then
|
|
|
|
run_substep "Running visual tests..."
|
|
|
|
if [ -z "$JOBS" ]; then
|
|
|
|
JOBS=1
|
|
|
|
fi
|
|
|
|
./test/visual/run -j $JOBS
|
|
|
|
failures=$((failures+$?))
|
|
|
|
else
|
|
|
|
echo "Notice: Skipping visual tests, the visual tests data are not present under the standard directory \"test/data-visual\"."
|
|
|
|
fi
|
|
|
|
|
2015-05-22 17:02:52 +00:00
|
|
|
else
|
2015-05-22 16:52:01 +00:00
|
|
|
echo "Notice: Skipping all tests, the test data are not present under the standard directory \"test/data\"."
|
2015-05-19 18:05:38 +00:00
|
|
|
fi
|
2015-02-17 16:28:49 +00:00
|
|
|
|
|
|
|
exit $failures
|