mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 01:46:14 +00:00
Start adding a test suite.
This commit is contained in:
parent
356ce76d44
commit
e3cc73bec4
@ -1,4 +1,4 @@
|
||||
SUBDIRS = doc src
|
||||
SUBDIRS = doc src test
|
||||
|
||||
EXTRA_DIST = \
|
||||
AUTHORS \
|
||||
|
@ -26,4 +26,5 @@ AC_OUTPUT([
|
||||
Makefile
|
||||
doc/Makefile
|
||||
src/Makefile
|
||||
test/Makefile
|
||||
])
|
||||
|
2
assembler/test/.gitignore
vendored
Normal file
2
assembler/test/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*.out
|
||||
mov
|
21
assembler/test/Makefile.am
Normal file
21
assembler/test/Makefile.am
Normal file
@ -0,0 +1,21 @@
|
||||
check_SCRIPTS = run-test.sh
|
||||
|
||||
TESTS_ENVIRONMENT = top_builddir=${top_builddir}
|
||||
TESTS = \
|
||||
mov
|
||||
|
||||
TESTDATA = \
|
||||
mov.expected \
|
||||
mov.g4a
|
||||
|
||||
EXTRA_DIST = \
|
||||
${TESTDATA} \
|
||||
run-test.sh
|
||||
|
||||
$(TESTS): run-test.sh
|
||||
sed "s|TEST|$@|g" ${srcdir}/run-test.sh > $@
|
||||
chmod +x $@
|
||||
|
||||
CLEANFILES = \
|
||||
*.out \
|
||||
${TESTS}
|
1
assembler/test/mov.expected
Normal file
1
assembler/test/mov.expected
Normal file
@ -0,0 +1 @@
|
||||
{ 0x00000001, 0x20000021, 0x00000020, 0x00000000 },
|
1
assembler/test/mov.g4a
Normal file
1
assembler/test/mov.g4a
Normal file
@ -0,0 +1 @@
|
||||
mov (1) g0<1>UD g1<0,1,0>UD { align1 };
|
9
assembler/test/run-test.sh
Normal file
9
assembler/test/run-test.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
TESTDIR=${srcdir-`pwd`}
|
||||
BUILDDIR=${top_builddir-`pwd`}
|
||||
|
||||
${BUILDDIR}/src/gen4asm -o TEST.out $TESTDIR/TEST.g4a
|
||||
if cmp TEST.out ${TESTDIR}/TEST.expected; then : ; else
|
||||
exit 1;
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user