[Lldb-commits] [lldb] 6f8360a - [lldb] Use the host's target triple in TestObjectFileJSON

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 13 14:22:02 PDT 2023


Author: Jonas Devlieghere
Date: 2023-04-13T14:20:58-07:00
New Revision: 6f8360a0e15f3affe3f711130c693059930bc317

URL: https://github.com/llvm/llvm-project/commit/6f8360a0e15f3affe3f711130c693059930bc317
DIFF: https://github.com/llvm/llvm-project/commit/6f8360a0e15f3affe3f711130c693059930bc317.diff

LOG: [lldb] Use the host's target triple in TestObjectFileJSON

Use the target's triple when adding JSON modules in TestObjectFileJSON.
This should fix the test failure on non-Darwin bots.

Added: 
    

Modified: 
    lldb/test/API/macosx/symbols/TestObjectFileJSON.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/macosx/symbols/TestObjectFileJSON.py b/lldb/test/API/macosx/symbols/TestObjectFileJSON.py
index d51cac8c376b2..04f91ec62f88b 100644
--- a/lldb/test/API/macosx/symbols/TestObjectFileJSON.py
+++ b/lldb/test/API/macosx/symbols/TestObjectFileJSON.py
@@ -29,8 +29,9 @@ def toModuleSpec(self, path):
 
     @no_debug_info_test
     def test_target(self):
+        triple = "arm64-apple-macosx13.0.0"
         data = {
-            "triple": self.TRIPLE,
+            "triple": triple,
             "uuid": str(uuid.uuid4()),
             "type": "executable",
         }
@@ -40,7 +41,7 @@ def test_target(self):
 
         target = self.dbg.CreateTarget(json_object_file)
         self.assertTrue(target.IsValid())
-        self.assertEqual(target.GetTriple(), self.TRIPLE)
+        self.assertEqual(target.GetTriple(), triple)
 
     @no_debug_info_test
     def test_module(self):
@@ -49,7 +50,7 @@ def test_module(self):
         target = self.dbg.CreateTarget(exe)
 
         data = {
-            "triple": self.TRIPLE,
+            "triple": target.GetTriple(),
             "uuid": str(uuid.uuid4()),
         }
 
@@ -60,7 +61,7 @@ def test_module(self):
         self.assertFalse(module.IsValid())
 
         data = {
-            "triple": self.TRIPLE,
+            "triple": target.GetTriple(),
             "uuid": str(uuid.uuid4()),
             "type": "sharedlibrary",
             "sections": [


        


More information about the lldb-commits mailing list