Homer Hsing 1c009349bc Fix missing environment variables problem in test/run-test.sh
Currently test/run-test.sh cannot get the value of ${srcdir} and
${top_builddir}. Thus we cannot run any test case. This patch uses
$0 to get the absolute path of run-test.sh. Now test cases work.
2013-03-04 15:54:32 +00:00

14 lines
277 B
Bash

#!/bin/sh
DIR="$( cd -P "$( dirname "$0" )" && pwd )"
${DIR}/../src/intel-gen4asm -o TEST.out ${DIR}/TEST.g4a
if cmp TEST.out ${DIR}/TEST.expected 2> /dev/null;
then
echo "Good";
else
echo "Output comparison for TEST"
diff -u ${DIR}/TEST.expected TEST.out
exit 1;
fi