summaryrefslogtreecommitdiff
path: root/test/navigation/script/test-all
blob: f9bddab37bd1ef74917d35efe9ddcc7c0434cb29 (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
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash

export PYTHONIOENCODING=utf-8
verbose=0
remote=""

while getopts hva:p: opt
do
	case $opt in
	v)
		verbose=1
		;;
	a)
		remote=$remote" -a "$OPTARG
		;;
	p)
		remote=$remote" -p "$OPTARG
		;;
	v)
		verbose=1
		;;
	h)
		echo "Usage:"
		echo "-a <host address>: host address for remote"
		echo "-p <port number>: port number"
		echo "-h: Help"
		echo "-v: Verbose"
		exit 1
	esac
done

if [ "$verbose" = 1 ]
then
	./test-location-input.py -l ../resource/locations.xml $remote
	./test-address-input.py -l ../resource/location.xml $remote
	./test-route-calculation.py -r ../resource/routes.xml $remote
	./test-poi.py -l ../resource/location.xml -s "sChü" $remote
	./test-poi-guidance.py -l ../resource/location-poi.xml -s "cOnT" $remote
	./test-guidance.py -r ../resource/route.xml $remote
	./test-map-viewer-control.py -l ../resource/location.xml $remote
else
	result="$(./test-location-input.py -l ../resource/locations.xml $remote 2>&1 >/dev/null)"
	echo $result
	if [[ $result != *"PASSED"* ]]; then 
		exit 1 
	fi

	result="$(./test-address-input.py -l ../resource/location.xml $remote  2>&1 >/dev/null)"
	echo $result
	if [[ $result != *"PASSED"* ]]; then 
		exit 1 
	fi

	result="$(./test-route-calculation.py -r ../resource/routes.xml $remote  2>&1 >/dev/null)"
	echo $result
	if [[ $result != *"PASSED"* ]]; then 
		exit 1 
	fi

	result="$(./test-poi.py -l ../resource/location.xml -s "sChü" $remote 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" $remote 2>&1 >/dev/null)"
	echo $result
	if [[ $result != *"PASSED"* ]]; then 
		exit 1 
	fi

	result="$(./test-guidance.py -r ../resource/route.xml $remote  2>&1 >/dev/null)"
	echo $result
	if [[ $result != *"PASSED"* ]]; then 
		exit 1 
	fi

	result="$(./test-map-viewer-control.py -l ../resource/location.xml $remote  2>&1 >/dev/null)"
	echo $result
	if [[ $result == *"PASSED"* ]]; then 
		echo "Batch test PASSED" 
	fi
fi