Skip to content

Commit 6ebc18e

Browse files
committed
update the script logging
1 parent 7164434 commit 6ebc18e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

scripts/gha/test_simulator.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,16 @@ def _uninstall_app(bundle_id, device_id):
201201

202202
def _get_test_log(bundle_id, app_path, device_id):
203203
"""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))
204206
result = subprocess.run(
205-
args=["xcrun", "simctl", "get_app_container", device_id, bundle_id, "data"],
207+
args=args,
206208
capture_output=True, text=True, check=False)
209+
210+
if not result.stdout:
211+
logging.error("No test Result")
212+
return None
213+
207214
log_path = os.path.join(result.stdout.strip(), "Documents/GameLoopResults/Results1.json")
208215
return _read_file(log_path)
209216

@@ -215,8 +222,14 @@ def _run_xctest(gameloop_app, device_id):
215222
"-destination", "id=%s" % device_id]
216223
logging.info("Running game-loop test: %s", " ".join(args))
217224
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+
218230
result = result.stdout.splitlines()
219231
log_path = next((s for s in result if ".xcresult" in s), None)
232+
logging.info("game-loop xctest result: %s", log_path)
220233
return log_path
221234

222235

0 commit comments

Comments
 (0)