Routino SVN Repository Browser

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

ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 838 - (hide annotations) (download) (as text)
Tue Sep 6 07:17:24 2011 UTC (13 years, 6 months ago) by amb
File MIME type: text/x-sh
File size: 2103 byte(s)
Store the expected results to check for future regressions.
1 amb 691 #!/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     [ -d $dir ] || mkdir $dir
22    
23 amb 711 # Run the programs under a run-time debugger
24    
25     debugger=valgrind
26     debugger=
27    
28 amb 691 # Name related options
29    
30     osm=$name.osm
31     log=$name$slim.log
32    
33     option_prefix="--prefix=$name"
34     option_dir="--dir=$dir"
35    
36     # Generic program options
37    
38 amb 811 option_planetsplitter="--loggable --tagging=../../xml/routino-tagging.xml --errorlog"
39 amb 711 option_filedumper="--dump-osm"
40 amb 691 option_router="--loggable --transport=motorcar --profiles=../../xml/routino-profiles.xml --translations=../../xml/routino-translations.xml"
41    
42     # Run planetsplitter
43    
44 amb 732 echo "Running planetsplitter"
45    
46 amb 691 echo ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm > $log
47 amb 711 $debugger ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm >> $log
48 amb 691
49 amb 711 # Run filedumper
50    
51 amb 732 echo "Running filedumper"
52    
53 amb 714 echo ../filedumper$slim $option_dir $option_prefix $option_filedumper >> $log
54 amb 711 $debugger ../filedumper$slim $option_dir $option_prefix $option_filedumper > $dir/$osm
55    
56 amb 691 # Waypoints
57    
58     waypoints=`perl waypoints.pl $osm list`
59    
60     waypoint_start=`perl waypoints.pl $osm WPstart 1`
61     waypoint_finish=`perl waypoints.pl $osm WPfinish 3`
62    
63     # Run the router for each waypoint
64    
65     for waypoint in $waypoints; do
66    
67     [ ! $waypoint = "WPstart" ] || continue
68     [ ! $waypoint = "WPfinish" ] || continue
69    
70 amb 732 echo "Running router : $waypoint"
71 amb 691
72     waypoint_test=`perl waypoints.pl $osm $waypoint 2`
73    
74     [ -d $dir/$name-$waypoint ] || mkdir $dir/$name-$waypoint
75    
76     echo ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_start $waypoint_test $waypoint_finish >> $log
77 amb 711 $debugger ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_start $waypoint_test $waypoint_finish >> $log
78 amb 691
79     mv shortest* $dir/$name-$waypoint
80    
81 amb 838 echo cmp $dir/$name-$waypoint/shortest-all.txt expected/$name-$waypoint.txt >> $log
82     cmp $dir/$name-$waypoint/shortest-all.txt expected/$name-$waypoint.txt >> $log
83    
84 amb 691 done

Properties

Name Value
svn:executable *