tests: disable ARM unwinding tests if ARM is unavailable
authorSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 8 Jan 2014 03:44:01 +0000 (03:44 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 8 Jan 2014 03:44:01 +0000 (03:44 +0000)
Appease the buildbots for targets which do not build the ARM support by moving
the ARM specific test into a subdirectory and use the lit configuration to
disable them appropriately.

Thanks to chapuni and thakis for explaining how to do this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198736 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/llvm-readobj/ARM/lit.local.cfg [new file with mode: 0644]
test/tools/llvm-readobj/ARM/unwind.s [new file with mode: 0644]
test/tools/llvm-readobj/arm-unwind.s [deleted file]

diff --git a/test/tools/llvm-readobj/ARM/lit.local.cfg b/test/tools/llvm-readobj/ARM/lit.local.cfg
new file mode 100644 (file)
index 0000000..8a3ba96
--- /dev/null
@@ -0,0 +1,4 @@
+targets = set(config.root.targets_to_build.split())
+if not 'ARM' in targets:
+    config.unsupported = True
+
diff --git a/test/tools/llvm-readobj/ARM/unwind.s b/test/tools/llvm-readobj/ARM/unwind.s
new file mode 100644 (file)
index 0000000..7d23a05
--- /dev/null
@@ -0,0 +1,203 @@
+@ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-readobj -u - \
+@ RUN:   | FileCheck %s
+
+       .syntax unified
+
+       .cpu cortex-a8
+       .fpu neon
+
+       .section .personality
+
+       .type __personality,%function
+__personality:
+       .fnstart
+       bkpt
+       .fnend
+
+
+       .section .personality0
+
+       .type personality0,%function
+personality0:
+       .fnstart
+       bx lr
+       .fnend
+
+
+       .section .personality1
+
+       .type personality1,%function
+personality1:
+       .fnstart
+       .pad #0x100
+       sub sp, sp, #0x100
+       .save {r0-r11}
+       push {r0-r11}
+       pop {r0-r11}
+       add sp, sp, #0x100
+       bx lr
+       .fnend
+
+
+       .section .custom_personality
+
+       .type custom_personality,%function
+custom_personality:
+       .fnstart
+       .personality __personality
+       bx lr
+       .fnend
+
+
+       .section .opcodes
+
+       .type opcodes,%function
+opcodes:
+       .fnstart
+       .vsave {d8-d12}
+       vpush {d8-d12}
+       vpop {d8-d12}
+       bx lr
+       .fnend
+
+
+       .section .multiple
+
+       .type function0,%function
+function0:
+       .fnstart
+       bx lr
+       .fnend
+
+       .type function1,%function
+function1:
+       .fnstart
+       .personality __personality
+       bx lr
+       .fnend
+
+       .type function2,%function
+function2:
+       .fnstart
+       bx lr
+       .fnend
+
+@ CHECK: UnwindInformation {
+@ CHECK:   UnwindIndexTable {
+@ CHECK:     SectionName: .ARM.exidx.personality
+@ CHECK:     Entries [
+@ CHECK:       Entry {
+@ CHECK:         FunctionAddress: 0x0
+@ CHECK:         FunctionName: __personality
+@ CHECK:         Model: Compact (Inline)
+@ CHECK:         PersonalityIndex: 0
+@ CHECK:         ByteCode [
+@ CHECK:           Instruction: 0xB0
+@ CHECK:           Instruction: 0xB0
+@ CHECK:           Instruction: 0xB0
+@ CHECK:         ]
+@ CHECK:       }
+@ CHECK:     ]
+@ CHECK:   }
+@ CHECK:   UnwindIndexTable {
+@ CHECK:     SectionName: .ARM.exidx.personality0
+@ CHECK:     Entries [
+@ CHECK:       Entry {
+@ CHECK:         FunctionAddress: 0x0
+@ CHECK:         FunctionName: personality0
+@ CHECK:         Model: Compact (Inline)
+@ CHECK:         PersonalityIndex: 0
+@ CHECK:         ByteCode [
+@ CHECK:           Instruction: 0xB0
+@ CHECK:           Instruction: 0xB0
+@ CHECK:           Instruction: 0xB0
+@ CHECK:         ]
+@ CHECK:       }
+@ CHECK:     ]
+@ CHECK:   }
+@ CHECK:   UnwindIndexTable {
+@ CHECK:     SectionName: .ARM.exidx.personality1
+@ CHECK:     Entries [
+@ CHECK:       Entry {
+@ CHECK:         FunctionAddress: 0x0
+@ CHECK:         FunctionName: personality1
+@ CHECK:         ExceptionHandlingTable: .ARM.extab.personality1
+@ CHECK:         TableEntryOffset: 0x0
+@ CHECK:         Model: Compact
+@ CHECK:         PersonalityIndex: 1
+@ CHECK:         ByteCode [
+@ CHECK:           Instruction: 0xB1
+@ CHECK:           Instruction: 0xF
+@ CHECK:           Instruction: 0xA7
+@ CHECK:           Instruction: 0x3F
+@ CHECK:           Instruction: 0xB0
+@ CHECK:           Instruction: 0xB0
+@ CHECK:         ]
+@ CHECK:       }
+@ CHECK:     ]
+@ CHECK:   }
+@ CHECK:   UnwindIndexTable {
+@ CHECK:     SectionName: .ARM.exidx.custom_personality
+@ CHECK:     Entries [
+@ CHECK:       Entry {
+@ CHECK:         FunctionAddress: 0x0
+@ CHECK:         FunctionName: custom_personality
+@ CHECK:         ExceptionHandlingTable: .ARM.extab.custom_personality
+@ CHECK:         TableEntryOffset: 0x0
+@ CHECK:         Model: Generic
+@ CHECK:         PersonalityRoutineAddress: 0x0
+@ CHECK:       }
+@ CHECK:     ]
+@ CHECK:   }
+@ CHECK:   UnwindIndexTable {
+@ CHECK:     SectionName: .ARM.exidx.opcodes
+@ CHECK:     Entries [
+@ CHECK:       Entry {
+@ CHECK:         FunctionAddress: 0x0
+@ CHECK:         FunctionName: opcodes
+@ CHECK:         Model: Compact (Inline)
+@ CHECK:         PersonalityIndex: 0
+@ CHECK:         ByteCode [
+@ CHECK:           Instruction: 0xC9
+@ CHECK:           Instruction: 0x84
+@ CHECK:           Instruction: 0xB0
+@ CHECK:         ]
+@ CHECK:       }
+@ CHECK:     ]
+@ CHECK:   }
+@ CHECK:   UnwindIndexTable {
+@ CHECK:     SectionName: .ARM.exidx.multiple
+@ CHECK:     Entries [
+@ CHECK:       Entry {
+@ CHECK:         FunctionAddress: 0x0
+@ CHECK:         FunctionName: function0
+@ CHECK:         Model: Compact (Inline)
+@ CHECK:         PersonalityIndex: 0
+@ CHECK:         ByteCode [
+@ CHECK:           Instruction: 0xB0
+@ CHECK:           Instruction: 0xB0
+@ CHECK:           Instruction: 0xB0
+@ CHECK:         ]
+@ CHECK:       }
+@ CHECK:       Entry {
+@ CHECK:         FunctionAddress: 0x4
+@ CHECK:         FunctionName: function1
+@ CHECK:         ExceptionHandlingTable: .ARM.extab.multiple
+@ CHECK:         Model: Generic
+@ CHECK:         PersonalityRoutineAddress: 0x0
+@ CHECK:       }
+@ CHECK:       Entry {
+@ CHECK:         FunctionAddress: 0x8
+@ CHECK:         FunctionName: function2
+@ CHECK:         Model: Compact (Inline)
+@ CHECK:         PersonalityIndex: 0
+@ CHECK:         ByteCode [
+@ CHECK:           Instruction: 0xB0
+@ CHECK:           Instruction: 0xB0
+@ CHECK:           Instruction: 0xB0
+@ CHECK:         ]
+@ CHECK:       }
+@ CHECK:     ]
+@ CHECK:   }
+@ CHECK: }
+
diff --git a/test/tools/llvm-readobj/arm-unwind.s b/test/tools/llvm-readobj/arm-unwind.s
deleted file mode 100644 (file)
index 7d23a05..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-@ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-readobj -u - \
-@ RUN:   | FileCheck %s
-
-       .syntax unified
-
-       .cpu cortex-a8
-       .fpu neon
-
-       .section .personality
-
-       .type __personality,%function
-__personality:
-       .fnstart
-       bkpt
-       .fnend
-
-
-       .section .personality0
-
-       .type personality0,%function
-personality0:
-       .fnstart
-       bx lr
-       .fnend
-
-
-       .section .personality1
-
-       .type personality1,%function
-personality1:
-       .fnstart
-       .pad #0x100
-       sub sp, sp, #0x100
-       .save {r0-r11}
-       push {r0-r11}
-       pop {r0-r11}
-       add sp, sp, #0x100
-       bx lr
-       .fnend
-
-
-       .section .custom_personality
-
-       .type custom_personality,%function
-custom_personality:
-       .fnstart
-       .personality __personality
-       bx lr
-       .fnend
-
-
-       .section .opcodes
-
-       .type opcodes,%function
-opcodes:
-       .fnstart
-       .vsave {d8-d12}
-       vpush {d8-d12}
-       vpop {d8-d12}
-       bx lr
-       .fnend
-
-
-       .section .multiple
-
-       .type function0,%function
-function0:
-       .fnstart
-       bx lr
-       .fnend
-
-       .type function1,%function
-function1:
-       .fnstart
-       .personality __personality
-       bx lr
-       .fnend
-
-       .type function2,%function
-function2:
-       .fnstart
-       bx lr
-       .fnend
-
-@ CHECK: UnwindInformation {
-@ CHECK:   UnwindIndexTable {
-@ CHECK:     SectionName: .ARM.exidx.personality
-@ CHECK:     Entries [
-@ CHECK:       Entry {
-@ CHECK:         FunctionAddress: 0x0
-@ CHECK:         FunctionName: __personality
-@ CHECK:         Model: Compact (Inline)
-@ CHECK:         PersonalityIndex: 0
-@ CHECK:         ByteCode [
-@ CHECK:           Instruction: 0xB0
-@ CHECK:           Instruction: 0xB0
-@ CHECK:           Instruction: 0xB0
-@ CHECK:         ]
-@ CHECK:       }
-@ CHECK:     ]
-@ CHECK:   }
-@ CHECK:   UnwindIndexTable {
-@ CHECK:     SectionName: .ARM.exidx.personality0
-@ CHECK:     Entries [
-@ CHECK:       Entry {
-@ CHECK:         FunctionAddress: 0x0
-@ CHECK:         FunctionName: personality0
-@ CHECK:         Model: Compact (Inline)
-@ CHECK:         PersonalityIndex: 0
-@ CHECK:         ByteCode [
-@ CHECK:           Instruction: 0xB0
-@ CHECK:           Instruction: 0xB0
-@ CHECK:           Instruction: 0xB0
-@ CHECK:         ]
-@ CHECK:       }
-@ CHECK:     ]
-@ CHECK:   }
-@ CHECK:   UnwindIndexTable {
-@ CHECK:     SectionName: .ARM.exidx.personality1
-@ CHECK:     Entries [
-@ CHECK:       Entry {
-@ CHECK:         FunctionAddress: 0x0
-@ CHECK:         FunctionName: personality1
-@ CHECK:         ExceptionHandlingTable: .ARM.extab.personality1
-@ CHECK:         TableEntryOffset: 0x0
-@ CHECK:         Model: Compact
-@ CHECK:         PersonalityIndex: 1
-@ CHECK:         ByteCode [
-@ CHECK:           Instruction: 0xB1
-@ CHECK:           Instruction: 0xF
-@ CHECK:           Instruction: 0xA7
-@ CHECK:           Instruction: 0x3F
-@ CHECK:           Instruction: 0xB0
-@ CHECK:           Instruction: 0xB0
-@ CHECK:         ]
-@ CHECK:       }
-@ CHECK:     ]
-@ CHECK:   }
-@ CHECK:   UnwindIndexTable {
-@ CHECK:     SectionName: .ARM.exidx.custom_personality
-@ CHECK:     Entries [
-@ CHECK:       Entry {
-@ CHECK:         FunctionAddress: 0x0
-@ CHECK:         FunctionName: custom_personality
-@ CHECK:         ExceptionHandlingTable: .ARM.extab.custom_personality
-@ CHECK:         TableEntryOffset: 0x0
-@ CHECK:         Model: Generic
-@ CHECK:         PersonalityRoutineAddress: 0x0
-@ CHECK:       }
-@ CHECK:     ]
-@ CHECK:   }
-@ CHECK:   UnwindIndexTable {
-@ CHECK:     SectionName: .ARM.exidx.opcodes
-@ CHECK:     Entries [
-@ CHECK:       Entry {
-@ CHECK:         FunctionAddress: 0x0
-@ CHECK:         FunctionName: opcodes
-@ CHECK:         Model: Compact (Inline)
-@ CHECK:         PersonalityIndex: 0
-@ CHECK:         ByteCode [
-@ CHECK:           Instruction: 0xC9
-@ CHECK:           Instruction: 0x84
-@ CHECK:           Instruction: 0xB0
-@ CHECK:         ]
-@ CHECK:       }
-@ CHECK:     ]
-@ CHECK:   }
-@ CHECK:   UnwindIndexTable {
-@ CHECK:     SectionName: .ARM.exidx.multiple
-@ CHECK:     Entries [
-@ CHECK:       Entry {
-@ CHECK:         FunctionAddress: 0x0
-@ CHECK:         FunctionName: function0
-@ CHECK:         Model: Compact (Inline)
-@ CHECK:         PersonalityIndex: 0
-@ CHECK:         ByteCode [
-@ CHECK:           Instruction: 0xB0
-@ CHECK:           Instruction: 0xB0
-@ CHECK:           Instruction: 0xB0
-@ CHECK:         ]
-@ CHECK:       }
-@ CHECK:       Entry {
-@ CHECK:         FunctionAddress: 0x4
-@ CHECK:         FunctionName: function1
-@ CHECK:         ExceptionHandlingTable: .ARM.extab.multiple
-@ CHECK:         Model: Generic
-@ CHECK:         PersonalityRoutineAddress: 0x0
-@ CHECK:       }
-@ CHECK:       Entry {
-@ CHECK:         FunctionAddress: 0x8
-@ CHECK:         FunctionName: function2
-@ CHECK:         Model: Compact (Inline)
-@ CHECK:         PersonalityIndex: 0
-@ CHECK:         ByteCode [
-@ CHECK:           Instruction: 0xB0
-@ CHECK:           Instruction: 0xB0
-@ CHECK:           Instruction: 0xB0
-@ CHECK:         ]
-@ CHECK:       }
-@ CHECK:     ]
-@ CHECK:   }
-@ CHECK: }
-