AsmParser now depends on clients to verify that input is well formed
[oota-llvm.git] / test / Feature / TestAsmDisasm.sh
1 #!/bin/sh
2 # test that every step outputs something that is consumable by 
3 # another step
4
5 rm -f test.bc.temp[12]
6
7 LD_LIBRARY_PATH=$3
8 export LD_LIBRARY_PATH
9
10 AS=$2/as
11 DIS=$2/dis
12
13 echo "======== Running assembler/disassembler test on $1"
14
15 # Two full cycles are needed for bitwise stability
16 (
17   $AS  < $1      > $1.bc.1 || exit 1
18   $DIS < $1.bc.1 > $1.ll.1 || exit 2
19   $AS  < $1.ll.1 > $1.bc.2 || exit 3
20   $DIS < $1.bc.2 > $1.ll.2 || exit 4
21
22   diff $1.ll.[12] || exit 7
23
24   # FIXME: When we sort things correctly and deterministically, we can
25   # reenable this
26   #diff $1.bc.[12] || exit 8
27
28   rm $1.[bl][cl].[12]
29   touch Output/$1.asmdis
30 ) || ../Failure.sh "$1 ASM/DIS"
31