Support of the osl_int_t union type
[candl.git] / tests / checker.sh
blob78c029a88ebca967b4dcb7e30b9156c801f8a524
1 #!/bin/sh
4 # /**-------------------------------------------------------------------**
5 # ** CAnDL **
6 # **-------------------------------------------------------------------**
7 # ** Makefile.am **
8 # **-------------------------------------------------------------------**
9 # ** First version: june 29th 2012 **
10 # **-------------------------------------------------------------------**/
12 #/*****************************************************************************
13 # * CAnDL : the Chunky Analyser for Dependences in Loops (experimental) *
14 # *****************************************************************************
15 # * *
16 # * Copyright (C) 2003-2008 Cedric Bastoul *
17 # * *
18 # * This is free software; you can redistribute it and/or modify it under the *
19 # * terms of the GNU Lesser General Public License as published by the Free *
20 # * Software Foundation; either version 3 of the License, or (at your option) *
21 # * any 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 Lesser General Public License *
29 # * along with software; if not, write to the Free Software Foundation, Inc., *
30 # * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
31 # * *
32 # * CAnDL, the Chunky Dependence Analyser *
33 # * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
34 # * *
35 # *****************************************************************************/
37 STRING=$1
38 FILES=$2
39 TRANSFO=$3
41 echo "$STRING"
43 for name in $FILES; do
44 echo "check $name \c"
46 orig_scop="$name.orig.scop"
47 struct="$name.struct"
48 clay_scop="$name.clay.scop" # only for transformations tests
50 # read candl options
51 candloptions=`grep "candl options" "$name" | cut -d'|' -f2`
53 case $TRANSFO in
55 candl $candloptions "$orig_scop" -struct | grep -v "enerated by" >/tmp/candl_struct
58 candl $candloptions "$clay_scop" -test "$orig_scop" -struct | grep -v "enerated by" >/tmp/candl_struct
60 esac
62 n=`diff /tmp/candl_struct "$struct" | wc -l`
63 if [ $n -ne 0 ]; then
64 echo "\033[31m[ FAIL ]\033[0m"
65 else
66 echo "\033[32m[ OK ]\033[0m"
69 rm -f /tmp/candl_struct
70 done