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@xxxxxxxx> --- assembler/test/run-test.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/assembler/test/run-test.sh b/assembler/test/run-test.sh index 20a408c61b2d..0a5252a89dc7 100644 --- a/assembler/test/run-test.sh +++ b/assembler/test/run-test.sh @@ -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 -- 2.9.5 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx