1#!/bin/sh
2
3EXEEXT=@EXEEXT@
4srcdir=@srcdir@
5
6failed=0
7
8for i in $srcdir/test_inputs/codegen/*.st \
9		$srcdir/test_inputs/codegen/cloog/*.st; do
10	echo $i;
11	base=`basename $i .st`
12	test=test-$base.c
13	dir=`dirname $i`
14	ref=$dir/$base.c
15	(./isl_codegen$EXEEXT < $i > $test &&
16	 diff -uw $ref $test && rm $test) || failed=1
17done
18for i in $srcdir/test_inputs/codegen/*.in \
19		$srcdir/test_inputs/codegen/omega/*.in \
20		$srcdir/test_inputs/codegen/pldi2012/*.in; do
21	echo $i;
22	base=`basename $i .in`
23	test=test-$base.c
24	dir=`dirname $i`
25	ref=$dir/$base.c
26	(./isl_codegen$EXEEXT < $i > $test &&
27	 diff -uw $ref $test && rm $test) || failed=1
28done
29
30test $failed -eq 0 || exit
31