summaryrefslogtreecommitdiff
path: root/test/navigation/script/test-all
blob: f5350af615c0468997dd785a68461c4ca142721f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/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