This commit is contained in:
Dane Springmeyer 2016-05-18 13:38:07 -04:00
parent 536ea734e8
commit 44ea60ad5f
2 changed files with 12 additions and 10 deletions

View file

@ -1,10 +1,12 @@
#!/bin/bash #!/bin/bash
# TODO - use rpath to avoid needing this to run tests locally # TODO - use rpath to avoid needing this to run tests locally
export CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ $(uname -s) = 'Darwin' ]; then if [[ $(uname -s) == 'Darwin' ]]; then
export DYLD_LIBRARY_PATH="${CURRENT_DIR}/src/":${DYLD_LIBRARY_PATH} export DYLD_LIBRARY_PATH="${CURRENT_DIR}/src/":${DYLD_LIBRARY_PATH:-""}
else elif [[ $(uname -s) == 'Linux' ]]; then
export LD_LIBRARY_PATH="${CURRENT_DIR}/src/":${LD_LIBRARY_PATH} export LD_LIBRARY_PATH="${CURRENT_DIR}/src/":${LD_LIBRARY_PATH:-""}
fi fi
export PATH=$(pwd)/utils/mapnik-render/:${PATH} export PATH=$(pwd)/utils/mapnik-render/:${PATH}

View file

@ -1,5 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail
set -eu
failures=0 failures=0
cd "$( dirname "${BASH_SOURCE[0]}" )" cd "$( dirname "${BASH_SOURCE[0]}" )"
@ -18,9 +21,8 @@ if [ -d "test/data" ]; then
run_substep "Running C++ Unit tests..." run_substep "Running C++ Unit tests..."
if [[ -f ./test/unit/run ]]; then if [[ -f ./test/unit/run ]]; then
./test/unit/run
failures=$((failures+$?))
ran_a_test=true ran_a_test=true
./test/unit/run || failures=$((failures+$?))
else else
run_warn "Skipping unit tests since they were not built" run_warn "Skipping unit tests since they were not built"
fi fi
@ -31,8 +33,7 @@ if [ -d "test/data" ]; then
for FILE in test/standalone/*-bin; do for FILE in test/standalone/*-bin; do
found_test=true found_test=true
ran_a_test=true ran_a_test=true
${FILE}; ${FILE} || failures=$((failures+$?))
failures=$((failures+$?))
done done
fi fi
if [[ $found_test == false ]]; then if [[ $found_test == false ]]; then
@ -45,9 +46,8 @@ if [ -d "test/data" ]; then
JOBS=1 JOBS=1
fi fi
if [[ -f ./test/visual/run ]]; then if [[ -f ./test/visual/run ]]; then
./test/visual/run -j $JOBS
ran_a_test=true ran_a_test=true
failures=$((failures+$?)) ./test/visual/run -j $JOBS || failures=$((failures+$?))
else else
run_warn "Skipping visual tests since they were not built" run_warn "Skipping visual tests since they were not built"
fi fi