2
from lldbsuite.test.lldbtest import *
3
from lldbsuite.test.decorators import *
4
import lldbsuite.test.lldbutil as lldbutil
8
class TestMacCatalystAppWithMacOSFramework(TestBase):
9
@skipIf(macos_version=["<", "10.15"])
13
@expectedFailureAll(bugnumber="rdar://problem/54986190>")
15
"""Test the x86_64-apple-ios-macabi target linked against a macos dylib"""
17
log = self.getBuildArtifact("packets.log")
18
self.expect("log enable gdb-remote packets -f " + log)
19
lldbutil.run_to_source_breakpoint(self, "break here", lldb.SBFileSpec("main.c"))
20
arch = self.getArchitecture()
24
arch + r".*-apple-ios.*-macabi a\.out",
25
arch + r".*-apple-macosx.* libfoo.dylib[^(]",
28
self.expect("fr v s", "Hello macCatalyst")
29
self.expect("expression s", "Hello macCatalyst")
30
self.check_debugserver(log)
32
def check_debugserver(self, log):
33
"""scan the debugserver packet log"""
34
process_info = lldbutil.packetlog_get_process_info(log)
35
self.assertIn("ostype", process_info)
36
self.assertEqual(process_info["ostype"], "maccatalyst")
40
dylib_info = lldbutil.packetlog_get_dylib_info(log)
41
for image in dylib_info["images"]:
42
if image["pathname"].endswith("a.out"):
44
if image["pathname"].endswith("libfoo.dylib"):
46
self.assertTrue(aout_info)
47
self.assertTrue(libfoo_info)
48
self.assertEqual(aout_info["min_version_os_name"], "maccatalyst")
49
self.assertEqual(libfoo_info["min_version_os_name"], "macosx")