Skip to content

Commit de81792

Browse files
committed
[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. (cherry picked from commit 6f8360a)
1 parent 2af5204 commit de81792

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ def toModuleSpec(self, path):
2929

3030
@no_debug_info_test
3131
def test_target(self):
32+
triple = "arm64-apple-macosx13.0.0"
3233
data = {
33-
"triple": self.TRIPLE,
34+
"triple": triple,
3435
"uuid": str(uuid.uuid4()),
3536
"type": "executable",
3637
}
@@ -40,7 +41,7 @@ def test_target(self):
4041

4142
target = self.dbg.CreateTarget(json_object_file)
4243
self.assertTrue(target.IsValid())
43-
self.assertEqual(target.GetTriple(), self.TRIPLE)
44+
self.assertEqual(target.GetTriple(), triple)
4445

4546
@no_debug_info_test
4647
def test_module(self):
@@ -49,7 +50,7 @@ def test_module(self):
4950
target = self.dbg.CreateTarget(exe)
5051

5152
data = {
52-
"triple": self.TRIPLE,
53+
"triple": target.GetTriple(),
5354
"uuid": str(uuid.uuid4()),
5455
}
5556

@@ -60,7 +61,7 @@ def test_module(self):
6061
self.assertFalse(module.IsValid())
6162

6263
data = {
63-
"triple": self.TRIPLE,
64+
"triple": target.GetTriple(),
6465
"uuid": str(uuid.uuid4()),
6566
"type": "sharedlibrary",
6667
"sections": [

0 commit comments

Comments
 (0)