1#!/bin/sh
2#
3#   /**-------------------------------------------------------------------**
4#    **                              CLooG                                **
5#    **-------------------------------------------------------------------**
6#    **                          check_run.sh                             **
7#    **-------------------------------------------------------------------**
8#    **                 First version: November 18th 2011                 **
9#    **-------------------------------------------------------------------**/
10#
11
12#/*****************************************************************************
13# *               CLooG : the Chunky Loop Generator (experimental)            *
14# *****************************************************************************
15# *                                                                           *
16# * Copyright (C) 2003 Cedric Bastoul                                         *
17# *                                                                           *
18# * This library is free software; you can redistribute it and/or             *
19# * modify it under the terms of the GNU Lesser General Public                *
20# * License as published by the Free Software Foundation; either              *
21# * version 2.1 of the License, or (at your option) any later version.        *
22# *                                                                           *
23# * This library is distributed in the hope that it will be useful,           *
24# * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
25# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
26# * Lesser General Public License for more details.                           *
27# *                                                                           *
28# * You should have received a copy of the GNU Lesser General Public          *
29# * License along with this library; if not, write to the Free Software       *
30# * Foundation, Inc., 51 Franklin Street, Fifth Floor,                        *
31# * Boston, MA  02110-1301  USA                                               *
32# *                                                                           *
33# * CLooG, the Chunky Loop Generator                                          *
34# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr                        *
35# *                                                                           *
36# *****************************************************************************/
37
38# Refactor $SPECIAL_OPTIONS list to remove quotes and to replace spaces in
39# individual tests with %, e.g., "'file1 -f -1' 'file2'" becomes
40# "file1%-f%-1 file2".
41special_refactored=`echo "$SPECIAL_OPTIONS" | \
42                    sed "s/' '/#/g"         | \
43                    sed 's/ /%/g'           | \
44                    sed "s/#/ /g"           | \
45                    sed "s/'//g"`
46
47$CHECKER "RUN C" "$FINITE_CLOOGTEST_C" "" "cloog" "c" "1"
48failedtest=$?;
49
50$CHECKER "RUN SPECIAL" "$special_refactored" "" "cloog" "c" "1"
51failedtest=`expr $failedtest + $?`;
52
53$CHECKER "RUN SPECIAL -sh 1" "$special_refactored" "-sh 1" "cloog" "c" "1"
54failedtest=`expr $failedtest + $?`;
55return $failedtest;
56