Routino SVN Repository Browser

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

ViewVC logotype

Annotation of /branches/libroutino/src/test/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 691 - (hide annotations) (download)
Fri May 6 18:05:53 2011 UTC (13 years, 10 months ago) by amb
Original Path: trunk/src/test/Makefile
File size: 1984 byte(s)
Routing test cases.

1 amb 691 # Test cases Makefile
2     #
3     # Part of the Routino routing software.
4     #
5     # This file Copyright 2010-2011 Andrew M. Bishop
6     #
7     # This program is free software: you can redistribute it and/or modify
8     # it under the terms of the GNU Affero General Public License as published by
9     # the Free Software Foundation, either version 3 of the License, or
10     # (at your option) any later version.
11     #
12     # This program is distributed in the hope that it will be useful,
13     # but WITHOUT ANY WARRANTY; without even the implied warranty of
14     # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     # GNU Affero General Public License for more details.
16     #
17     # You should have received a copy of the GNU Affero General Public License
18     # along with this program. If not, see <http://www.gnu.org/licenses/>.
19     #
20    
21     # Routino executables
22    
23     EXE=../planetsplitter ../planetsplitter-slim \
24     ../router ../router-slim \
25     ../filedumper ../filedumper-slim
26    
27     # Compilation targets
28    
29     O=$(notdir $(wildcard *.osm))
30     S=$(foreach f,$(O),$(addsuffix .sh,$(basename $f)))
31    
32     ########
33    
34     all :
35     @true
36    
37     ########
38    
39     $(EXE) :
40     cd .. && $(MAKE)
41    
42     ########
43    
44     test : all $(EXE) .FORCE
45     @status=true ;\
46     [ -d fat ] || mkdir fat ;\
47     for script in $(S); do \
48     echo "" ;\
49     echo "Testing: $$script (non-slim) ... " ;\
50     if ./$$script fat; then echo "... passed"; else echo "... FAILED"; status=false; fi ;\
51     done ;\
52     [ -d slim ] || mkdir slim ;\
53     for script in $(S); do \
54     echo "" ;\
55     echo "Testing: $$script (slim) ... " ;\
56     if ./$$script slim; then echo "... passed"; else echo "... FAILED"; status=false; fi ;\
57     done ;\
58     echo "" ;\
59     if $$status; then echo "Success: all tests passed"; else echo "Warning: Some tests FAILED"; fi ;\
60     $$status || exit 1 ;\
61     echo "" ;\
62     echo "Comparing: slim and non-slim results ... " ;\
63     if diff -q -r slim fat; then echo "... matched"; else echo "... match FAILED"; status=false; fi ;\
64     $$status
65    
66     ########
67    
68     clean:
69     rm -rf slim
70     rm -rf fat
71     rm -f *~
72    
73     ########
74    
75     distclean: clean
76     @true
77    
78     ########
79    
80     .FORCE :