3 # /**------- <| --------------------------------------------------------**
5 # **--- /.\ -----------------------------------------------------**
6 # ** <| [""M# checker.sh **
7 # **- A | # -----------------------------------------------------**
8 # ** /.\ [""M# First version: 30/04/2008 **
9 # **- [""M# | # U"U#U -----------------------------------------------**
12 # ****** | "--' .-" *****************************************************
13 # * |"-"-"-"-"-#-#-## Clan : the Chunky Loop Analyser (experimental) *
14 # **** | # ## ###### ****************************************************
16 # * \ ::::'/ Copyright (C) 2008 Cedric Bastoul *
18 # * ::88a ### This is free software; you can redistribute it *
19 # * ::::888a 8a ##::. and/or modify it under the terms of the GNU *
20 # * ::::::::888a88a[]::: Lesser General Public License as published by *
21 # *::8:::::::::SUNDOGa8a::. the Free Software Foundation, either version 3 of *
22 # *::::::::8::::888:Y8888:: the License, or (at your option) *
23 # *::::':::88::::888::Y88a::::::::::::... any later version. *
24 # *::'::.. . ..... .. ... . *
25 # * This software is distributed in the hope that it will be useful, but *
26 # * WITHOUT ANY WARRANTY; without even the implied warranty of *
27 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
28 # * Public License for more details. *
30 # * You should have received a copy of the GNU Lesser General Public *
31 # * License along with software; if not, write to the Free Software *
32 # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
34 # * Clan, the Chunky Loop Analyser *
35 # * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
37 # *****************************************************************************/
43 for i
in $TEST_FILES; do
44 nb_tests
=$
(($nb_tests + 1))
46 echo "[TEST:] Source parser test:== $i ==";
47 $top_builddir/source
/clan
$i -arraystag > $i.
test 2>/tmp
/clanout
48 z
=`diff --ignore-matching-lines='generated by ' $i.test $i.scop 2>&1`
49 err
=`cat /tmp/clanout`;
50 if ! [ -z "$z" ]; then
51 echo -e "\033[31m[FAIL:] Source parser test: Wrong .scop generated\033[0m";
55 if ! [ -z "$err" ]; then
56 if [ $outtemp = "0" ]; then
57 echo "[INFO:] Source parser test: .scop OK";
59 echo -e "\033[31m[FAIL:] Source parser test: stderr output: $err\033[0m";
63 if [ $outtemp = "0" ]; then
64 echo "[PASS:] Source parser test: .scop OK";
68 echo "[TEST:] .SCoP parser test:== $i.scop ==";
69 $top_builddir/source
/clan
-inputscop $i.scop
> $i.parsetest
70 z
=`diff --ignore-matching-lines='generated by ' $i.parsetest $i.scop`
71 if ! [ -z "$z" ]; then
72 echo -e "\033[31m[FAIL:] .SCoP parser test: $i\033[0m";
76 echo "[PASS:] .SCoP parser test: .scop re-OK";
80 if [ $output = "1" ]; then
81 echo -e "\033[31m[FAIL:] $1\033[0m";
83 echo "[PASS:] $1 ($nb_tests + $nb_tests tests)";