Routino SVN Repository Browser

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

ViewVC logotype

Contents of /trunk/src/test/start-1-finish.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1784 - (show annotations) (download) (as text)
Sat Aug 15 13:08:37 2015 UTC (9 years, 7 months ago) by amb
File MIME type: text/x-sh
File size: 2691 byte(s)
Merge libroutino branch back into the trunk.

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="--profile=motorcar --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 3`
93
94 # Run the router for each waypoint
95
96 for waypoint in $waypoints; do
97
98 [ ! $waypoint = "WPstart" ] || continue
99 [ ! $waypoint = "WPfinish" ] || continue
100
101 echo "Running router : $waypoint"
102
103 waypoint_test=`perl waypoints.pl $osm $waypoint 2`
104
105 [ -d $dir/$name-$waypoint ] || mkdir $dir/$name-$waypoint
106
107 echo ../router$lib$slim $option_dir $option_prefix $option_osm $option_router $waypoint_start $waypoint_test $waypoint_finish >> $log
108 $debugger ../router$lib$slim $option_dir $option_prefix $option_osm $option_router $waypoint_start $waypoint_test $waypoint_finish >> $log
109
110 mv shortest* $dir/$name-$waypoint
111
112 echo diff -u expected/$name-$waypoint.txt $dir/$name-$waypoint/shortest-all.txt >> $log
113
114 if ./is-fast-math; then
115 diff -U 0 expected/$name-$waypoint.txt $dir/$name-$waypoint/shortest-all.txt | 2>&1 egrep '^[-+] ' || true
116 else
117 diff -u expected/$name-$waypoint.txt $dir/$name-$waypoint/shortest-all.txt >> $log
118 fi
119
120 done

Properties

Name Value
svn:executable *