heptagon/test/scripts/compile_fail
2012-07-16 11:22:56 +02:00

29 lines
385 B
Bash
Executable file

#!/bin/bash
source scripts/config
progpath=$1
shift
coption=$*
cp $progpath $checkdir
pushd $checkdir > /dev/null
heptprog=`basename $progpath`
echo $HEPTC $coption $heptprog
$HEPTC $coption $heptprog
res=$?
if [ $res = 0 ] ; then
echo "ERROR : compilation of $progpath should have failed"
fi
popd $checkdir > /dev/null
if [ $res = 0 ] ; then
exit 1
else
exit 0
fi