Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Contents of /branches/destination-access/src/test/cycle-drive.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1807 - (show annotations) (download) (as text)
Wed Sep 23 18:20:13 2015 UTC (9 years, 5 months ago) by amb
File MIME type: text/x-sh
File size: 2665 byte(s)
Merge the trunk changes back into the destination-access branch.

1 #!/bin/sh
2
3 # Exit on error
4
5 set -e
6
7 # Test name
8
9 name=`basename $0 .sh`
10
11 # Slim or non-slim
12
13 if [ "$1" = "slim" ]; then
14 slim="-slim"
15 dir="slim"
16 else
17 slim=""
18 dir="fat"
19 fi
20
21 # Libroutino or not libroutino
22
23 LD_LIBRARY_PATH=$PWD/..:$LD_LIBRARY_PATH
24 export LD_LIBRARY_PATH
25
26 if [ "$2" = "lib" ]; then
27 lib="+lib"
28 else
29 lib=""
30 fi
31
32 # Pruned or non-pruned
33
34 if [ "$2" = "prune" ]; then
35 prune=""
36 pruned="-pruned"
37 else
38 prune="--prune-none"
39 pruned=""
40 fi
41
42 # Create the output directory
43
44 dir=$dir$lib$pruned
45
46 [ -d $dir ] || mkdir $dir
47
48 # Run the programs under a run-time debugger
49
50 debugger=valgrind
51 debugger=
52
53 # Name related options
54
55 osm=$name.osm
56 log=$name$lib$slim$pruned.log
57
58 option_prefix="--prefix=$name"
59 option_dir="--dir=$dir"
60
61 # Generic program options
62
63 option_planetsplitter="--loggable --tagging=../../xml/routino-tagging.xml --errorlog $prune"
64
65 option_filedumper="--dump-osm"
66
67 option_router="--profiles=../../xml/routino-profiles.xml --translations=copyright.xml"
68
69 if [ ! "$2" = "lib" ]; then
70 option_router="$option_router --loggable"
71 fi
72
73 # Run planetsplitter
74
75 echo "Running planetsplitter"
76
77 echo ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm > $log
78 $debugger ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm >> $log
79
80 # Run filedumper
81
82 echo "Running filedumper"
83
84 echo ../filedumper$slim $option_dir $option_prefix $option_filedumper >> $log
85 $debugger ../filedumper$slim $option_dir $option_prefix $option_filedumper > $dir/$osm
86
87 # Waypoints
88
89 waypoints=`perl waypoints.pl $osm list`
90
91 waypoint_start=`perl waypoints.pl $osm WPstart 1`
92 waypoint_finish=`perl waypoints.pl $osm WPfinish 2`
93
94 # Run the router for each profile type
95
96 profiles="motorcar bicycle"
97
98 for profile in $profiles; do
99
100 case $profile in
101 motorcar) waypoint=WP01 ;;
102 *) waypoint=WP02 ;;
103 esac
104
105 echo "Running router : $waypoint"
106
107 [ -d $dir/$name-$waypoint ] || mkdir $dir/$name-$waypoint
108
109 echo ../router$lib$slim $option_dir $option_prefix $option_osm $option_router --profile=$profile $waypoint_start $waypoint_finish >> $log
110 $debugger ../router$lib$slim $option_dir $option_prefix $option_osm $option_router --profile=$profile $waypoint_start $waypoint_finish >> $log
111
112 mv shortest* $dir/$name-$waypoint
113
114 echo diff -u expected/$name-$waypoint.txt $dir/$name-$waypoint/shortest-all.txt >> $log
115
116 if ./is-fast-math; then
117 diff -U 0 expected/$name-$waypoint.txt $dir/$name-$waypoint/shortest-all.txt | 2>&1 egrep '^[-+] ' || true
118 else
119 diff -u expected/$name-$waypoint.txt $dir/$name-$waypoint/shortest-all.txt >> $log
120 fi
121
122 done

Properties

Name Value
svn:executable *