@@ -39,7 +39,7 @@ def check_debugserver(self, log, expected_platform, expected_version):
39
39
if expected_version :
40
40
self .assertEqual (aout_info ["min_version_os_sdk" ], expected_version )
41
41
42
- def run_with (self , arch , os , vers , env , expected_load_command ):
42
+ def run_with (self , arch , os , vers , env , expected_load_command , expected_platform = None ):
43
43
env_list = [env ] if env else []
44
44
triple = "-" .join ([arch , "apple" , os + vers ] + env_list )
45
45
sdk = lldbutil .get_xcode_sdk (os , env )
@@ -75,6 +75,11 @@ def run_with(self, arch, os, vers, env, expected_load_command):
75
75
self , "break here" , lldb .SBFileSpec ("hello.c" )
76
76
)
77
77
triple_re = "-" .join ([arch , "apple" , os + vers + ".*" ] + env_list )
78
+ if expected_platform is not None :
79
+ # The current platform should be expected
80
+ self .expect ("platform status" , patterns = [r"Platform: " + expected_platform ])
81
+ # Should be able to list processes on the current platform
82
+ self .expect ("platform process list" , patterns = [r"\d+ matching processes were found on \"%s\"" % expected_platform ])
78
83
self .expect ("image list -b -t" , patterns = [r"a\.out " + triple_re ])
79
84
self .check_debugserver (log , os + env , vers )
80
85
@@ -90,6 +95,7 @@ def test_ios(self):
90
95
vers = "" ,
91
96
env = "simulator" ,
92
97
expected_load_command = "LC_BUILD_VERSION" ,
98
+ expected_platform = "ios-simulator" ,
93
99
)
94
100
95
101
@skipIfAsan
0 commit comments