Skip to content

Commit

Permalink
[lldb] Use the host's target triple in TestObjectFileJSON
Browse files Browse the repository at this point in the history
Use the target's triple when adding JSON modules in TestObjectFileJSON.
This should fix the test failure on non-Darwin bots.
  • Loading branch information
JDevlieghere committed Apr 13, 2023
1 parent 0e5cdbf commit 6f8360a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lldb/test/API/macosx/symbols/TestObjectFileJSON.py
Expand Up @@ -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",
}
Expand All @@ -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):
Expand All @@ -49,7 +50,7 @@ def test_module(self):
target = self.dbg.CreateTarget(exe)

data = {
"triple": self.TRIPLE,
"triple": target.GetTriple(),
"uuid": str(uuid.uuid4()),
}

Expand All @@ -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": [
Expand Down

0 comments on commit 6f8360a

Please sign in to comment.