aboutsummaryrefslogtreecommitdiffstats
path: root/test/Feature/TestAsmDisasm.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/Feature/TestAsmDisasm.sh')
-rwxr-xr-xtest/Feature/TestAsmDisasm.sh30
1 files changed, 16 insertions, 14 deletions
diff --git a/test/Feature/TestAsmDisasm.sh b/test/Feature/TestAsmDisasm.sh
index 7d84968..56a9700 100755
--- a/test/Feature/TestAsmDisasm.sh
+++ b/test/Feature/TestAsmDisasm.sh
@@ -4,26 +4,28 @@
rm -f test.bc.temp[12]
-LD_LIBRARY_PATH=../lib/Debug:/usr/dcs/software/evaluation/encap/gcc-3.0.2/lib/
+LD_LIBRARY_PATH=../../lib/Debug
export LD_LIBRARY_PATH
-AS=../tools/Debug/as
-DIS=../tools/Debug/dis
-export AS
-export DIS
+AS=../../tools/Debug/as
+DIS=../../tools/Debug/dis
+echo "======== Running assembler/disassembler test on $1"
# Two full cycles are needed for bitwise stability
+(
+ $AS < $1 > $1.bc.1 || exit 1
+ $DIS < $1.bc.1 > $1.ll.1 || exit 2
+ $AS < $1.ll.1 > $1.bc.2 || exit 3
+ $DIS < $1.bc.2 > $1.ll.2 || exit 4
-$AS < $1 > $1.bc.1 || exit 1
-$DIS < $1.bc.1 > $1.ll.1 || exit 2
-$AS < $1.ll.1 > $1.bc.2 || exit 3
-$DIS < $1.bc.2 > $1.ll.2 || exit 4
+ diff $1.ll.[12] || exit 7
-diff $1.ll.[12] || exit 7
+ # FIXME: When we sort things correctly and deterministically, we can
+ # reenable this
+ #diff $1.bc.[12] || exit 8
-# FIXME: When we sort things correctly and deterministically, we can reenable this
-#diff $1.bc.[12] || exit 8
-
-rm $1.[bl][cl].[12]
+ rm $1.[bl][cl].[12]
+ touch Output/$1.asmdis
+) || ./Failure.sh "$1 ASM/DIS"