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/a-b-c.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 840 - (show annotations) (download) (as text)
Tue Sep 6 07:33:45 2011 UTC (13 years, 6 months ago) by amb
File MIME type: text/x-sh
File size: 2088 byte(s)
Ensure that test cases have correct copyright notice (Routino, AGPL3) in
generated data and not the default one (OSM, CC-SA).

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=copyright.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 # Run the router for each waypoint
61
62 for waypoint in $waypoints; do
63
64 case $waypoint in
65 *a) waypoint=`echo $waypoint | sed -e 's%a$%%'` ;;
66 *) continue ;;
67 esac
68
69 echo "Running router : $waypoint"
70
71 waypoint_a=`perl waypoints.pl $osm ${waypoint}a 1`
72 waypoint_b=`perl waypoints.pl $osm ${waypoint}b 2`
73 waypoint_c=`perl waypoints.pl $osm ${waypoint}c 3`
74
75 [ -d $dir/$name-$waypoint ] || mkdir $dir/$name-$waypoint
76
77 echo ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_a $waypoint_b $waypoint_c >> $log
78 $debugger ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_a $waypoint_b $waypoint_c >> $log
79
80 mv shortest* $dir/$name-$waypoint
81
82 echo cmp $dir/$name-$waypoint/shortest-all.txt expected/$name-$waypoint.txt >> $log
83 cmp $dir/$name-$waypoint/shortest-all.txt expected/$name-$waypoint.txt >> $log
84
85 done

Properties

Name Value
svn:executable *