From: Jason Molenda Date: Wed, 12 Sep 2018 19:30:03 +0000 (+0000) Subject: If we fail to get an armv7em-- disassembler from llvm, skip the X-Git-Tag: llvmorg-8.0.0-rc1~8867 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=956ff0f8bf8c0eaea965056fb97a2a592ebdd1d0;p=platform%2Fupstream%2Fllvm.git 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. llvm-svn: 342072 --- diff --git a/lldb/unittests/Disassembler/TestArmv7Disassembly.cpp b/lldb/unittests/Disassembler/TestArmv7Disassembly.cpp index 005aae5..600d793 100644 --- a/lldb/unittests/Disassembler/TestArmv7Disassembly.cpp +++ b/lldb/unittests/Disassembler/TestArmv7Disassembly.cpp @@ -67,7 +67,10 @@ TEST_F(TestArmv7Disassembly, TestCortexFPDisass) { 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());