[Lldb-commits] [lldb] r342072 - If we fail to get an armv7em-- disassembler from llvm, skip the

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 12 12:30:03 PDT 2018


Author: jmolenda
Date: Wed Sep 12 12:30:03 2018
New Revision: 342072

URL: http://llvm.org/viewvc/llvm-project?rev=342072&view=rev
Log:
If we fail to get an armv7em-- disassembler from llvm, skip the
tests and don't mark this as a failure.  This happens when we've
linked against an llvm without the ARM target built in.  Davide
added some cmake conditionals to avoid building this test when the
target was absent from llvm's build, but we're still finding some
bots that manage to get in this situation.

<rdar://problem/44270082> 

Modified:
    lldb/trunk/unittests/Disassembler/TestArmv7Disassembly.cpp

Modified: lldb/trunk/unittests/Disassembler/TestArmv7Disassembly.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Disassembler/TestArmv7Disassembly.cpp?rev=342072&r1=342071&r2=342072&view=diff
==============================================================================
--- lldb/trunk/unittests/Disassembler/TestArmv7Disassembly.cpp (original)
+++ lldb/trunk/unittests/Disassembler/TestArmv7Disassembly.cpp Wed Sep 12 12:30:03 2018
@@ -67,7 +67,10 @@ TEST_F(TestArmv7Disassembly, TestCortexF
   disass_sp = Disassembler::DisassembleBytes(arch, nullptr, nullptr, start_addr,
                                  &data, sizeof (data), num_of_instructions, false);
 
-  ASSERT_NE (nullptr, disass_sp.get());
+  // If we failed to get a disassembler, we can assume it is because
+  // the llvm we linked against was not built with the ARM target,
+  // and we should skip these tests without marking anything as failing.
+
   if (disass_sp) {
     const InstructionList inst_list (disass_sp->GetInstructionList());
     EXPECT_EQ (num_of_instructions, inst_list.GetSize());




More information about the lldb-commits mailing list