@@ -201,9 +201,16 @@ def _uninstall_app(bundle_id, device_id):
201
201
202
202
def _get_test_log (bundle_id , app_path , device_id ):
203
203
"""Read integration_test app testing result."""
204
+ args = ["xcrun" , "simctl" , "get_app_container" , device_id , bundle_id , "data" ]
205
+ logging .info ("Get test result: %s" , " " .join (args ))
204
206
result = subprocess .run (
205
- args = [ "xcrun" , "simctl" , "get_app_container" , device_id , bundle_id , "data" ] ,
207
+ args = args ,
206
208
capture_output = True , text = True , check = False )
209
+
210
+ if not result .stdout :
211
+ logging .error ("No test Result" )
212
+ return None
213
+
207
214
log_path = os .path .join (result .stdout .strip (), "Documents/GameLoopResults/Results1.json" )
208
215
return _read_file (log_path )
209
216
@@ -215,8 +222,14 @@ def _run_xctest(gameloop_app, device_id):
215
222
"-destination" , "id=%s" % device_id ]
216
223
logging .info ("Running game-loop test: %s" , " " .join (args ))
217
224
result = subprocess .run (args = args , capture_output = True , text = True , check = False )
225
+
226
+ if not result .stdout :
227
+ logging .error ("No xctest result" )
228
+ return None
229
+
218
230
result = result .stdout .splitlines ()
219
231
log_path = next ((s for s in result if ".xcresult" in s ), None )
232
+ logging .info ("game-loop xctest result: %s" , log_path )
220
233
return log_path
221
234
222
235
0 commit comments