mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-23 15:56:33 +00:00
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.
This commit is contained in:
parent
868cbf7dc5
commit
1c009349bc
@ -1,11 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
SRCDIR=${srcdir-`pwd`}
|
DIR="$( cd -P "$( dirname "$0" )" && pwd )"
|
||||||
BUILDDIR=${top_builddir-`pwd`}
|
|
||||||
|
|
||||||
${BUILDDIR}/src/intel-gen4asm -o TEST.out $SRCDIR/TEST.g4a
|
${DIR}/../src/intel-gen4asm -o TEST.out ${DIR}/TEST.g4a
|
||||||
if cmp TEST.out ${SRCDIR}/TEST.expected 2> /dev/null; then : ; else
|
if cmp TEST.out ${DIR}/TEST.expected 2> /dev/null;
|
||||||
|
then
|
||||||
|
echo "Good";
|
||||||
|
else
|
||||||
echo "Output comparison for TEST"
|
echo "Output comparison for TEST"
|
||||||
diff -u ${SRCDIR}/TEST.expected TEST.out
|
diff -u ${DIR}/TEST.expected TEST.out
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user