From 6f8360a0e15f3affe3f711130c693059930bc317 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 13 Apr 2023 14:19:39 -0700 Subject: [PATCH] [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. --- lldb/test/API/macosx/symbols/TestObjectFileJSON.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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": [