[Lldb-commits] [lldb] 9f5210a - [lldb] Print the load command that wasn't found in TestSimulatorPlatform

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 19 12:43:05 PDT 2020


Author: Jonas Devlieghere
Date: 2020-08-19T12:42:59-07:00
New Revision: 9f5210aacfec8602beb60f309389e2261b4d3c75

URL: https://github.com/llvm/llvm-project/commit/9f5210aacfec8602beb60f309389e2261b4d3c75
DIFF: https://github.com/llvm/llvm-project/commit/9f5210aacfec8602beb60f309389e2261b4d3c75.diff

LOG: [lldb] Print the load command that wasn't found in TestSimulatorPlatform

Print which load command we were looking for when the sanity check
fails:

  AssertionError: 0 != 1 : wrong number of load commands for
  LC_VERSION_MIN_MACOSX

Added: 
    

Modified: 
    lldb/test/API/macosx/simulator/TestSimulatorPlatform.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py b/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
index 9fd542d2f667..4c3a86531c8f 100644
--- a/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
+++ b/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
@@ -21,7 +21,10 @@ def check_load_commands(self, expected_load_command):
         for line in load_cmds.split('\n'):
             if expected_load_command in line:
               found += 1
-        self.assertEquals(found, 1, "wrong load command")
+        self.assertEquals(
+            found, 1, "wrong number of load commands for {}".format(
+                expected_load_command))
+
 
     def check_debugserver(self, log, expected_platform, expected_version):
         """scan the debugserver packet log"""


        


More information about the lldb-commits mailing list