summaryrefslogtreecommitdiff
path: root/assembler
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2017-09-05 14:36:13 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-09-08 17:05:57 +0200
commitc3863e1998a5d46492b4ec91dd411e2d561e1472 (patch)
treef324ec0c2bb84099edf13b0dee8fe02e2b8cc99e /assembler
parent30db6471fc9878abdaf1bd88d4afffd1eb116dcd (diff)
assembler/test: Prep work for meson
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. Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'assembler')
-rw-r--r--assembler/test/run-test.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/assembler/test/run-test.sh b/assembler/test/run-test.sh
index 20a408c6..0a5252a8 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