Move project test environments into the workspace

This commit is contained in:
2026-10-01 21:48:49 +08:00
parent f011d8357d
commit c2756ca4d6
23 changed files with 834 additions and 6 deletions
@@ -321,7 +321,8 @@ def main() -> int:
raise RuntimeError("当前设备地址不是电脑热点网段")
import paramiko
keys = paramiko.HostKeys()
keys.load(str(Path.home() / ".codex-tools/tmp/qms-mobile-known_hosts"))
from local_test_paths import SSH_KNOWN_HOSTS
keys.load(str(SSH_KNOWN_HOSTS))
expected_key = next(iter(keys.lookup(fields["IP"].strip()).values()))
board = connect_at(current_ip, expected_key, fields)
original, backup_root, backup_unit = resume_configuration(board, fields)
@@ -355,8 +356,8 @@ def main() -> int:
"static_address": static_address, "hotspot_gateway": hotspot["gateway"],
"wrong_password": "qms-invalid-password-2026",
}
private_tmp = Path.home() / ".codex-tools/tmp"
private_tmp.mkdir(parents=True, exist_ok=True)
from local_test_paths import private_directory
private_tmp = private_directory()
path = private_tmp / ("qms-wifi-test-" + secrets.token_hex(8) + ".json")
path.write_text(json.dumps(values, ensure_ascii=False), encoding="utf-8")
host_secret = path