Add: test scripts (sync_sessions, test_all_pages, test_e2e_agent_browser)

This commit is contained in:
ishenwei
2026-04-14 11:04:37 +08:00
parent 74458b4fab
commit 6f0b3e231a
3 changed files with 1556 additions and 2 deletions

View File

@@ -388,11 +388,19 @@ def sync_cron_jobs(args):
new_runs = []
new_state = {}
# Detect remote platform (Linux vs macOS) for stat syntax
uname_result = subprocess.run(
["ssh", ssh_host, "uname"],
capture_output=True, text=True, timeout=10,
)
is_macos = uname_result.stdout.strip() == "Darwin"
stat_cmd = f"stat -f %m" if is_macos else f"stat -c %Y"
for run_file in run_files:
remote_full = f"{runs_path}/{run_file}"
remote_full = f"{runs_path}/{Path(run_file).name}"
# Get mtime via SSH
result = subprocess.run(
["ssh", ssh_host, f"stat -c %Y {remote_full}"],
["ssh", ssh_host, f"{stat_cmd} {remote_full}"],
capture_output=True, text=True, timeout=10,
)
if result.returncode != 0: