diff options
Diffstat (limited to 'test/Feature/TestAsmDisasm.sh')
-rwxr-xr-x | test/Feature/TestAsmDisasm.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Feature/TestAsmDisasm.sh b/test/Feature/TestAsmDisasm.sh new file mode 100755 index 0000000000..86753e0eef --- /dev/null +++ b/test/Feature/TestAsmDisasm.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# test that every step outputs something that is consumable by +# another step + +rm -f test.bc.temp[12] + +LD_LIBRARY_PATH=../lib/Assembly/Parser/Debug:../lib/Assembly/Writer/Debug:../lib/Analysis/Debug:../lib/VMCore/Debug:../lib/Bytecode/Writer/Debug:../lib/Bytecode/Reader/Debug:../lib/Optimizations/Debug +export LD_LIBRARY_PATH + +# Two full cycles are needed for bitwise stability + +../tools/as/as < $1 > $1.bc.1 || exit 1 +../tools/dis/dis < $1.bc.1 > $1.ll.1 || exit 2 +../tools/as/as < $1.ll.1 > $1.bc.2 || exit 3 +../tools/dis/dis < $1.bc.2 > $1.ll.2 || exit 4 + +diff $1.ll.[12] || exit 7 +diff $1.bc.[12] || exit 8 + +rm $1.[bl][cl].[12] + |