Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Annotation of /trunk/src/test/a-b-c.sh
Parent Directory
|
Revision Log
Revision 730 -
(hide annotations)
(download)
(as text)
Sun May 29 15:06:16 2011 UTC (13 years, 9 months ago) by amb
File MIME type: text/x-sh
File size: 2129 byte(s)
Sun May 29 15:06:16 2011 UTC (13 years, 9 months ago) by amb
File MIME type: text/x-sh
File size: 2129 byte(s)
Exit on error.
1 | amb | 726 | #!/bin/sh |
2 | |||
3 | # Exit on error | ||
4 | |||
5 | amb | 730 | set -e |
6 | amb | 726 | |
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" | ||
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 ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm | ||
45 | echo ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm > $log | ||
46 | $debugger ../planetsplitter$slim $option_dir $option_prefix $option_planetsplitter $osm >> $log | ||
47 | |||
48 | # Run filedumper | ||
49 | |||
50 | echo ../filedumper$slim $option_dir $option_prefix $option_filedumper | ||
51 | echo ../filedumper$slim $option_dir $option_prefix $option_filedumper >> $log | ||
52 | $debugger ../filedumper$slim $option_dir $option_prefix $option_filedumper > $dir/$osm | ||
53 | |||
54 | # Waypoints | ||
55 | |||
56 | waypoints=`perl waypoints.pl $osm list` | ||
57 | |||
58 | # Run the router for each waypoint | ||
59 | |||
60 | for waypoint in $waypoints; do | ||
61 | |||
62 | case $waypoint in | ||
63 | *a) waypoint=`echo $waypoint | sed -e 's%a$%%'` ;; | ||
64 | *) continue ;; | ||
65 | esac | ||
66 | |||
67 | echo "Waypoint : $waypoint" | ||
68 | |||
69 | waypoint_a=`perl waypoints.pl $osm ${waypoint}a 1` | ||
70 | waypoint_b=`perl waypoints.pl $osm ${waypoint}b 2` | ||
71 | waypoint_c=`perl waypoints.pl $osm ${waypoint}c 3` | ||
72 | |||
73 | [ -d $dir/$name-$waypoint ] || mkdir $dir/$name-$waypoint | ||
74 | |||
75 | echo ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_a $waypoint_b $waypoint_c | ||
76 | echo ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_a $waypoint_b $waypoint_c >> $log | ||
77 | $debugger ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_a $waypoint_b $waypoint_c >> $log | ||
78 | |||
79 | mv shortest* $dir/$name-$waypoint | ||
80 | |||
81 | done |
Properties
Name | Value |
---|---|
svn:executable | * |