Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /trunk/src/test/start-1-finish.sh
Parent Directory
|
Revision Log
Revision 838 -
(show 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)
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 | #!/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 | # Run the programs under a run-time debugger |
24 | |
25 | debugger=valgrind |
26 | debugger= |
27 | |
28 | # 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 | option_planetsplitter="--loggable --tagging=../../xml/routino-tagging.xml --errorlog" |
39 | option_filedumper="--dump-osm" |
40 | option_router="--loggable --transport=motorcar --profiles=../../xml/routino-profiles.xml --translations=../../xml/routino-translations.xml" |
41 | |
42 | # Run planetsplitter |
43 | |
44 | echo "Running planetsplitter" |
45 | |
46 | echo ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm > $log |
47 | $debugger ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm >> $log |
48 | |
49 | # Run filedumper |
50 | |
51 | echo "Running filedumper" |
52 | |
53 | echo ../filedumper$slim $option_dir $option_prefix $option_filedumper >> $log |
54 | $debugger ../filedumper$slim $option_dir $option_prefix $option_filedumper > $dir/$osm |
55 | |
56 | # 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 | echo "Running router : $waypoint" |
71 | |
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 | $debugger ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_start $waypoint_test $waypoint_finish >> $log |
78 | |
79 | mv shortest* $dir/$name-$waypoint |
80 | |
81 | 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 | done |
Properties
Name | Value |
---|---|
svn:executable | * |