Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Annotation of /branches/destination-access/src/test/a-b-c.sh
Parent Directory
|
Revision Log
Revision 1073 -
(hide annotations)
(download)
(as text)
Thu Sep 20 18:31:45 2012 UTC (12 years, 6 months ago) by amb
Original Path: trunk/src/test/a-b-c.sh
File MIME type: text/x-sh
File size: 2343 byte(s)
Thu Sep 20 18:31:45 2012 UTC (12 years, 6 months ago) by amb
Original Path: trunk/src/test/a-b-c.sh
File MIME type: text/x-sh
File size: 2343 byte(s)
Change the scripts for the test cases to use 'diff' instead of 'cmp' so that it is possible to see the changes.
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 | amb | 975 | # 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 | amb | 726 | [ -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 | amb | 975 | log=$name$slim$pruned.log |
46 | amb | 726 | |
47 | option_prefix="--prefix=$name" | ||
48 | option_dir="--dir=$dir" | ||
49 | |||
50 | # Generic program options | ||
51 | |||
52 | amb | 975 | option_planetsplitter="--loggable --tagging=../../xml/routino-tagging.xml --errorlog $prune" |
53 | amb | 726 | option_filedumper="--dump-osm" |
54 | amb | 840 | option_router="--loggable --transport=motorcar --profiles=../../xml/routino-profiles.xml --translations=copyright.xml" |
55 | amb | 726 | |
56 | # Run planetsplitter | ||
57 | |||
58 | amb | 732 | echo "Running planetsplitter" |
59 | |||
60 | amb | 726 | 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 | amb | 732 | echo "Running filedumper" |
66 | |||
67 | amb | 726 | 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 | # Run the router for each waypoint | ||
75 | |||
76 | for waypoint in $waypoints; do | ||
77 | |||
78 | case $waypoint in | ||
79 | *a) waypoint=`echo $waypoint | sed -e 's%a$%%'` ;; | ||
80 | *) continue ;; | ||
81 | esac | ||
82 | |||
83 | amb | 732 | echo "Running router : $waypoint" |
84 | amb | 726 | |
85 | waypoint_a=`perl waypoints.pl $osm ${waypoint}a 1` | ||
86 | waypoint_b=`perl waypoints.pl $osm ${waypoint}b 2` | ||
87 | waypoint_c=`perl waypoints.pl $osm ${waypoint}c 3` | ||
88 | |||
89 | [ -d $dir/$name-$waypoint ] || mkdir $dir/$name-$waypoint | ||
90 | |||
91 | echo ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_a $waypoint_b $waypoint_c >> $log | ||
92 | $debugger ../router$slim $option_dir $option_prefix $option_osm $option_router $waypoint_a $waypoint_b $waypoint_c >> $log | ||
93 | |||
94 | mv shortest* $dir/$name-$waypoint | ||
95 | |||
96 | amb | 975 | if [ "$pruned" = "" ]; then |
97 | amb | 838 | |
98 | amb | 1073 | echo diff -u expected/$name-$waypoint.txt $dir/$name-$waypoint/shortest-all.txt >> $log |
99 | diff -u expected/$name-$waypoint.txt $dir/$name-$waypoint/shortest-all.txt >> $log | ||
100 | amb | 975 | |
101 | fi | ||
102 | |||
103 | amb | 726 | done |
Properties
Name | Value |
---|---|
svn:executable | * |