codegen_test.sh: avoid use of constructs not supported by /bin/sh on Solaris
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 28 Feb 2013 15:59:03 +0000 (28 16:59 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 28 Feb 2013 15:59:03 +0000 (28 16:59 +0100)
Reported-by: Amos <a.goo0h@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
codegen_test.sh.in

index 4a4852d..dd0c488 100644 (file)
@@ -8,8 +8,10 @@ for i in $srcdir/test_inputs/codegen/*.in \
                $srcdir/test_inputs/codegen/omega/*.in \
                $srcdir/test_inputs/codegen/pldi2012/*.in; do
        echo $i;
-       test=test-`basename $i .in`.c
-       ref=${i%.in}.c
+       base=`basename $i .in`
+       test=test-$base.c
+       dir=`dirname $i`
+       ref=$dir/$base.c
        (./isl_codegen$EXEEXT < $i > $test &&
         diff -uw $ref $test && rm $test) || exit
 done