Skip to content

Commit 8d49995

Browse files
committed
Fix TestDisassemble_VST1_64
- use a full triple instead of just the architecture (makes the test pass on non-apple hosts) - skip the test if the ARM llvm target is not built llvm-svn: 374863
1 parent b2661a2 commit 8d49995

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class Disassemble_VST1_64(TestBase):
1919

2020
@add_test_categories(['pyapi'])
2121
@no_debug_info_test
22-
@skipIf(triple='^mips')
22+
@skipIfLLVMTargetMissing("ARM")
2323
def test_disassemble_invalid_vst_1_64_raw_data(self):
2424
"""Test disassembling invalid vst1.64 raw bytes with the API."""
2525
# Create a target from the debugger.
26-
target = self.dbg.CreateTargetWithFileAndTargetTriple("", "thumbv7")
26+
target = self.dbg.CreateTargetWithFileAndTargetTriple("", "thumbv7-apple-macosx")
2727
self.assertTrue(target, VALID_TARGET)
2828

2929
raw_bytes = bytearray([0xf0, 0xb5, 0x03, 0xaf,
@@ -45,6 +45,11 @@ def split(s):
4545

4646
insts = target.GetInstructions(lldb.SBAddress(), raw_bytes)
4747

48+
if self.TraceOn():
49+
print()
50+
for i in insts:
51+
print("Disassembled %s" % str(i))
52+
4853
if sys.version_info.major >= 3:
4954
sio = StringIO()
5055
insts.Print(sio)
@@ -59,11 +64,6 @@ def split(s):
5964
inst.Print(sio)
6065
self.assertEqual(asm, sio.getvalue().strip())
6166

62-
if self.TraceOn():
63-
print()
64-
for i in insts:
65-
print("Disassembled%s" % str(i))
66-
6767
raw_bytes = bytearray([0x04, 0xf9, 0xed, 0x82])
6868

6969
insts = target.GetInstructions(lldb.SBAddress(), raw_bytes)

0 commit comments

Comments
 (0)