[travis] Stop building/running OS X tests to try to finish before 50 min
This commit is contained in:
parent
0656e02ea0
commit
280978c422
2 changed files with 28 additions and 6 deletions
|
@ -62,7 +62,7 @@ commit_message_contains () {
|
||||||
}
|
}
|
||||||
|
|
||||||
commit_message_parse () {
|
commit_message_parse () {
|
||||||
if commit_message_contains '[skip tests]'; then
|
if commit_message_contains '[skip tests]' || [[ $(uname -s) == 'Darwin' ]]; then
|
||||||
config_override "CPP_TESTS = False"
|
config_override "CPP_TESTS = False"
|
||||||
fi
|
fi
|
||||||
if commit_message_contains '[skip utils]'; then
|
if commit_message_contains '[skip utils]'; then
|
||||||
|
|
24
test/run
24
test/run
|
@ -9,30 +9,48 @@ source ./localize.sh
|
||||||
function run_step { >&2 echo -e "\033[1m\033[34m* $1\033[0m"; }
|
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_substep { >&2 echo -e "\033[1m\033[36m* $1\033[0m"; }
|
||||||
function run_success { >&2 echo -e "\033[1m\033[32m* $1\033[0m"; }
|
function run_success { >&2 echo -e "\033[1m\033[32m* $1\033[0m"; }
|
||||||
|
function run_warn { >&2 echo -e "\033[1m\033[31m* $1\033[0m"; }
|
||||||
|
|
||||||
run_step "Starting Mapnik tests"
|
run_step "Starting Mapnik tests"
|
||||||
|
|
||||||
|
ran_a_test=false
|
||||||
if [ -d "test/data" ]; then
|
if [ -d "test/data" ]; then
|
||||||
|
|
||||||
run_substep "Running C++ Unit tests..."
|
run_substep "Running C++ Unit tests..."
|
||||||
|
if [[ -f ./test/unit/run ]]; then
|
||||||
./test/unit/run
|
./test/unit/run
|
||||||
failures=$((failures+$?))
|
failures=$((failures+$?))
|
||||||
|
ran_a_test=true
|
||||||
|
else
|
||||||
|
run_warn "Skipping unit tests since they were not built"
|
||||||
|
fi
|
||||||
|
|
||||||
run_substep "Running standalone C++ tests..."
|
run_substep "Running standalone C++ tests..."
|
||||||
|
found_test=false
|
||||||
if [ -n "$(find test/standalone/ -maxdepth 1 -name '*-bin' -print -quit)" ]; then
|
if [ -n "$(find test/standalone/ -maxdepth 1 -name '*-bin' -print -quit)" ]; then
|
||||||
for FILE in test/standalone/*-bin; do
|
for FILE in test/standalone/*-bin; do
|
||||||
|
found_test=true
|
||||||
|
ran_a_test=true
|
||||||
${FILE};
|
${FILE};
|
||||||
failures=$((failures+$?))
|
failures=$((failures+$?))
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
if [[ $found_test == false ]]; then
|
||||||
|
run_warn "Skipping standalone tests since they were not built"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d "test/data-visual/styles" ]; then
|
if [ -d "test/data-visual/styles" ]; then
|
||||||
run_substep "Running visual tests..."
|
run_substep "Running visual tests..."
|
||||||
if [ -z "$JOBS" ]; then
|
if [ -z "$JOBS" ]; then
|
||||||
JOBS=1
|
JOBS=1
|
||||||
fi
|
fi
|
||||||
./test/visual/run -j $JOBS
|
if [[ -f ./test/unit/visual ]]; then
|
||||||
|
./test/unit/visual -j $JOBS
|
||||||
|
ran_a_test=true
|
||||||
failures=$((failures+$?))
|
failures=$((failures+$?))
|
||||||
|
else
|
||||||
|
run_warn "Skipping visual tests since they were not built"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Notice: Skipping visual tests, the visual tests data are not present under the standard directory \"test/data-visual\"."
|
echo "Notice: Skipping visual tests, the visual tests data are not present under the standard directory \"test/data-visual\"."
|
||||||
fi
|
fi
|
||||||
|
@ -41,4 +59,8 @@ else
|
||||||
echo "Notice: Skipping all tests, the test data are not present under the standard directory \"test/data\"."
|
echo "Notice: Skipping all tests, the test data are not present under the standard directory \"test/data\"."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $ran_a_test == false ]]; then
|
||||||
|
run_warn "**** WARNING: no tests were run ****"
|
||||||
|
fi
|
||||||
|
|
||||||
exit $failures
|
exit $failures
|
||||||
|
|
Loading…
Add table
Reference in a new issue