@@ -3,9 +3,17 @@
SRCDIR=${srcdir-`pwd`}
BUILDDIR=${top_builddir-`pwd`}
-${BUILDDIR}/intel-gen4asm -o TEST.out $SRCDIR/TEST.g4a
-if cmp TEST.out ${SRCDIR}/TEST.expected 2> /dev/null; then : ; else
- echo "Output comparison for TEST"
- diff -u ${SRCDIR}/TEST.expected TEST.out
+test="TEST"
+
+if [[ "$1" != "" ]] ; then
+ test="$1"
+fi
+
+test -d ${BUILDDIR}/test || mkdir ${BUILDDIR}/test/
+
+${BUILDDIR}/intel-gen4asm -o ${BUILDDIR}/${test}.out $SRCDIR/${test}.g4a
+if cmp ${BUILDDIR}/${test}.out ${SRCDIR}/${test}.expected 2> /dev/null; then : ; else
+ echo "Output comparison for ${test}"
+ diff -u ${SRCDIR}/${test}.expected ${test}.out
exit 1;
fi
Again we want to be able to run each testcase individually. Also, we need to make sure the target directory for the temp files exists - meson always builds with a build-dir outside of the source tree. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> --- assembler/test/run-test.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)