Routino SVN Repository Browser

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

ViewVC logotype

Contents of /branches/2.3.2-dev/src/test/start-1-finish.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1081 - (show annotations) (download) (as text)
Sat Oct 6 12:30:07 2012 UTC (12 years, 6 months ago) by amb
File MIME type: text/x-sh
File size: 2337 byte(s)
Merge changes from trunk into 2.3.2 branch (revs 1056-1077).
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 # Pruned or non-pruned
22
23 if [ "$2" = "prune" ]; then
24 prune=""
25 pruned="-pruned"
26 else
27 prune="--prune-none"
28 pruned=""
29 fi
30
31 # Create the output directory
32
33 dir="$dir$pruned"
34
35 [ -d $dir ] || mkdir $dir
36
37 # Run the programs under a run-time debugger
38
39 debugger=valgrind
40 debugger=
41
42 # Name related options
43
44 osm=$name.osm
45 log=$name$slim$pruned.log
46
47 option_prefix="--prefix=$name"
48 option_dir="--dir=$dir"
49
50 # Generic program options
51
52 option_planetsplitter="--loggable --tagging=../../xml/routino-tagging.xml --errorlog $prune"
53 option_filedumper="--dump-osm"
54 option_router="--loggable --transport=motorcar --profiles=../../xml/routino-profiles.xml --translations=copyright.xml"
55
56 # Run planetsplitter
57
58 echo "Running planetsplitter"
59
60 echo ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm > $log
61 $debugger ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm >> $log
62
63 # Run filedumper
64
65 echo "Running filedumper"
66
67 echo ../filedumper$slim $option_dir $option_prefix $option_filedumper >> $log
68 $debugger ../filedumper$slim $option_dir $option_prefix $option_filedumper > $dir/$osm
69
70 # Waypoints
71
72 waypoints=`perl waypoints.pl $osm list`
73
74 waypoint_start=`perl waypoints.pl $osm WPstart 1`
75 waypoint_finish=`perl waypoints.pl $osm WPfinish 3`
76
77 # Run the router for each waypoint
78
79 for waypoint in $waypoints; do
80
81 [ ! $waypoint = "WPstart" ] || continue
82 [ ! $waypoint = "WPfinish" ] || continue
83
84 echo "Running router : $waypoint"
85
86 waypoint_test=`perl waypoints.pl $osm $waypoint 2`
87
88 [ -d $dir/$name-$waypoint ] || mkdir $dir/$name-$waypoint
89
90 echo ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_start $waypoint_test $waypoint_finish >> $log
91 $debugger ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_start $waypoint_test $waypoint_finish >> $log
92
93 mv shortest* $dir/$name-$waypoint
94
95 if [ "$pruned" = "" ]; then
96
97 echo diff -u expected/$name-$waypoint.txt $dir/$name-$waypoint/shortest-all.txt >> $log
98 diff -u expected/$name-$waypoint.txt $dir/$name-$waypoint/shortest-all.txt >> $log
99
100 fi
101
102 done

Properties

Name Value
svn:executable *