#!/bin/bash export PYTHONIOENCODING=utf-8 verbose=0 while getopts hv opt do case $opt in v) verbose=1 ;; h) echo "Usage:" echo "-h: Help" echo "-v: Verbose" exit 1 esac done if [ "$verbose" = 1 ] then ./test-location-input.py -l ../resource/locations.xml ./test-address-input.py -l ../resource/location.xml ./test-route-calculation.py -r ../resource/routes.xml ./test-poi.py -l ../resource/location.xml -s "sChü" ./test-poi-guidance.py -l ../resource/location-poi.xml -s "cOnT" ./test-guidance.py -r ../resource/route.xml ./test-map-viewer-control.py -l ../resource/location.xml else result="$(./test-location-input.py -l ../resource/locations.xml 2>&1 >/dev/null)" echo $result if [[ $result != *"PASSED"* ]]; then exit 1 fi result="$(./test-address-input.py -l ../resource/location.xml 2>&1 >/dev/null)" echo $result if [[ $result != *"PASSED"* ]]; then exit 1 fi result="$(./test-route-calculation.py -r ../resource/routes.xml 2>&1 >/dev/null)" echo $result if [[ $result != *"PASSED"* ]]; then exit 1 fi result="$(./test-poi.py -l ../resource/location.xml -s "sChü" 2>&1 >/dev/null)" echo $result if [[ $result != *"PASSED"* ]]; then exit 1 fi result="$(./test-poi-guidance.py -l ../resource/location-poi.xml -s "cOnT" 2>&1 >/dev/null)" echo $result if [[ $result != *"PASSED"* ]]; then exit 1 fi result="$(./test-guidance.py -r ../resource/route.xml 2>&1 >/dev/null)" echo $result if [[ $result != *"PASSED"* ]]; then exit 1 fi result="$(./test-map-viewer-control.py -l ../resource/location.xml 2>&1 >/dev/null)" echo $result if [[ $result == *"PASSED"* ]]; then echo "Batch test PASSED" fi fi