First commit : 0.14.0 version (with roadmap in doc instead of
[cloog/uuh.git] / test / makefile
blob50e5050a767d5829e43d9a2f4a1a443f41da2190
2 # /**-------------------------------------------------------------------**
3 # ** CLooG **
4 # **-------------------------------------------------------------------**
5 # ** makefile **
6 # **-------------------------------------------------------------------**
7 # ** First version: march 6th 2003 **
8 # **-------------------------------------------------------------------**/
10 # makefile for checking.
12 #/*****************************************************************************
13 # * CLooG : the Chunky Loop Generator (experimental) *
14 # *****************************************************************************
15 # * *
16 # * Copyright (C) 2003 Cedric Bastoul *
17 # * *
18 # * This is free software; you can redistribute it and/or modify it under the *
19 # * terms of the GNU General Public License as published by the Free Software *
20 # * Foundation; either version 2 of the License, or (at your option) any *
21 # * later version. *
22 # * *
23 # * This software is distributed in the hope that it will be useful, but *
24 # * WITHOUT ANY WARRANTY; without even the implied warranty of *
25 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
26 # * Public License for more details. *
27 # * *
28 # * You should have received a copy of the GNU General Public License along *
29 # * with software; if not, write to the Free Software Foundation, Inc., *
30 # * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
31 # * *
32 # * CLooG, the Chunky Loop Generator *
33 # * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
34 # * This file has been written with the help of the Bart Kienhuis's checking *
35 # * makefile for PipLib. *
36 # * *
37 # *****************************************************************************/
39 ROOT = ..
41 CLOOGTEST_C = \
42 1point-1 \
43 1point-2 \
44 4-param \
45 basic-bounds-1 \
46 basic-bounds-2 \
47 basic-bounds-3 \
48 basic-bounds-4 \
49 basic-bounds-5 \
50 basic-bounds-6 \
51 byu98-1-2-3 \
52 cholesky \
53 cholesky2 \
54 classen \
55 darte \
56 donotsimp \
57 dot \
58 dot2 \
59 double \
60 durbin_e_s \
61 emploi \
62 esced \
63 escedk \
64 ex1 \
65 forwardsub-1-1-2 \
66 forwardsub-2-1-2-3 \
67 forwardsub-3-1-2 \
68 gauss \
69 gesced \
70 gesced2 \
71 gesced3 \
72 guide \
73 iftest \
74 iftest2 \
75 infinite \
76 infinite2 \
77 infinite3 \
78 infinite4 \
79 largeur \
80 levenshtein-1-2-3 \
81 lineality-1-2 \
82 lineality-2-1-2 \
83 logo \
84 logopar \
85 lu \
86 lu2 \
87 lub \
88 lux \
89 min-1-1 \
90 min-2-1 \
91 min-3-1 \
92 min-4-1 \
93 mode \
94 multi-mm-1 \
95 no_lindep \
96 orc \
97 rectangle \
98 square+triangle-1-1-2-3 \
99 swim \
100 test \
101 thomasset \
102 tiling \
103 vivien \
104 vivien2 \
105 wavefront \
106 yosr \
107 yosr2 \
108 ./non_optimal/nul_complex1 \
109 ./non_optimal/usvd_e_t \
110 ./non_optimal/youcef \
111 ./reservoir/cholesky2 \
112 ./reservoir/fusion1 \
113 ./reservoir/fusion2 \
114 ./reservoir/jacobi2 \
115 ./reservoir/jacobi3 \
116 ./reservoir/lim-lam1 \
117 ./reservoir/lim-lam2 \
118 ./reservoir/lim-lam3 \
119 ./reservoir/lim-lam4 \
120 ./reservoir/lim-lam5 \
121 ./reservoir/lim-lam6 \
122 ./reservoir/liu-zhuge1 \
123 ./reservoir/loechner3 \
124 ./reservoir/loechner4 \
125 ./reservoir/loechner5 \
126 ./reservoir/mg-interp2 \
127 ./reservoir/mg-interp \
128 ./reservoir/mg-psinv \
129 ./reservoir/mg-resid \
130 ./reservoir/mg-rprj3 \
131 ./reservoir/pingali1 \
132 ./reservoir/pingali2 \
133 ./reservoir/pingali3 \
134 ./reservoir/pingali4 \
135 ./reservoir/pingali5 \
136 ./reservoir/pingali6 \
137 ./reservoir/QR \
138 ./reservoir/tang-xue1 \
139 ./reservoir/two
141 # ./reservoir/long \
142 # faber \
144 CLOOGTEST_FORTRAN = \
145 dartef \
146 iftestf \
147 levenshtein-1-2-3f \
148 yosrf
150 CLOOGTEST_STRIDED = \
151 nul_basic1 \
152 nul_basic2 \
153 nul_lcpc
155 generate:
156 @echo " /*-----------------------------------------------*"
157 @echo " * Generate files *"
158 @echo " *-----------------------------------------------*/"
159 for x in $(CLOOGTEST_C) ; do \
160 echo "Generate $$x.c" ; \
161 cloog $$x.cloog -o $$x.c ; \
162 done ; \
163 for x in $(CLOOGTEST_FORTRAN) ; do \
164 echo "Generate $$x.f" ; \
165 cloog $$x.cloog -o $$x.f ; \
166 done
168 valgrind:
169 @echo " /*-----------------------------------------------*"
170 @echo " * Checking files by Valgrind *"
171 @echo " *-----------------------------------------------*/"
172 for x in $(CLOOGTEST_C) ; do \
173 echo "Valgrinding $$x.c" ; \
174 valgrind $(ROOT)/obj_$(TARGET)/cloog$(EXEC_SUFFIX) $$x.cloog ; \
175 done ; \
176 for x in $(CLOOGTEST_FORTRAN) ; do \
177 echo "Valgrinding $$x.f" ; \
178 valgrind $(ROOT)/obj_$(TARGET)/cloog$(EXEC_SUFFIX) $$x.cloog ; \
179 done
181 test:
182 @echo " /*-----------------------------------------------*"
183 @echo " * Testing CLooG *"
184 @echo " *-----------------------------------------------*/"
185 failedtest=0 ; \
186 echo "--- Testing C files..." ; \
187 for x in $(CLOOGTEST_C) ; do \
188 echo "Verify file $$x" ; \
189 $(ROOT)/obj_$(TARGET)/cloog$(EXEC_SUFFIX) $$x.cloog > ttemp ; \
190 diff -w --ignore-matching-lines='CLooG' ttemp $$x.c ; \
191 result=$$?; \
192 if [ "$$result" -eq "1" ] ; then \
193 echo "!!! Error: $$x is not the same" ; \
194 failedtest=`expr $$failedtest + 1` ; \
195 else \
196 echo "$$x passed" ; \
197 fi ; \
198 done ; \
199 echo "--- Testing FORTRAN files..." ; \
200 for x in $(CLOOGTEST_FORTRAN) ; do \
201 echo "Verify file $$x" ; \
202 $(ROOT)/obj_$(TARGET)/cloog$(EXEC_SUFFIX) $$x.cloog > ttemp ; \
203 diff -w --ignore-matching-lines='CLooG' ttemp $$x.f ; \
204 result=$$?; \
205 if [ "$$result" -eq "1" ] ; then \
206 echo "!!! Error: $$x is not the same" ; \
207 failedtest=`expr $$failedtest + 1` ; \
208 else \
209 echo "$$x passed" ; \
210 fi ; \
211 done ; \
212 echo "--- Testing STRIDED files..." ; \
213 for x in $(CLOOGTEST_STRIDED) ; do \
214 echo "Verify file $$x" ; \
215 $(ROOT)/obj_$(TARGET)/cloog$(EXEC_SUFFIX) $$x.cloog \
216 -strides 1 > ttemp ; \
217 diff -w --ignore-matching-lines='CLooG' ttemp $$x.c ; \
218 result=$$?; \
219 if [ "$$result" -eq "1" ] ; then \
220 echo "!!! Error: $$x is not the same" ; \
221 failedtest=`expr $$failedtest + 1` ; \
222 else \
223 echo "$$x passed" ; \
224 fi ; \
225 done ; \
226 echo "--- Testing SPECIAL OPTIONS files..." ; \
227 echo "Verify file vasilache (-f 8 -l 9)" ; \
228 x=vasilache ; \
229 $(ROOT)/obj_$(TARGET)/cloog$(EXEC_SUFFIX) $$x.cloog \
230 -f 8 -l 9 > ttemp ; \
231 diff -w --ignore-matching-lines='CLooG' ttemp $$x.c ; \
232 result=$$?; \
233 if [ "$$result" -eq "1" ] ; then \
234 echo "!!! Error: $$x is not the same" ; \
235 failedtest=`expr $$failedtest + 1` ; \
236 else \
237 echo "$$x passed" ; \
238 fi ; \
239 rm ttemp ; \
240 if [ $$failedtest != 0 ] ; then \
241 echo "$$failedtest tests failed" ; \
242 else \
243 echo "CLooG works correctly :-) !" ; \
246 # Include the shared compilation rules
247 include $(ROOT)/makefile