fix: continue released verify batches and bound automation shutdown

This commit is contained in:
阿白叔 committed 2026-11-04 20:51:35 +08:00
1 parent 477a5a46e3
commit 00db1cf5f2
23 files changed
+550 -115

No files matched your search

+6 -2
View File
@@ -849,18 +849,22 @@ def test_repair_release_uses_real_process_query_contract(tmp_path, monkeypatch,
queried = []
names = ('ExpeditionPCB.exe', 'LibraryManager.exe', 'iCDBProjectBackup.exe',
'ReuseBlockImporter.exe', 'cscript.exe')
queries = {"SELECT ProcessId, ParentProcessId, ExecutablePath, CommandLine "
queries = {"SELECT ProcessId,Name,CommandLine,ExecutablePath,ParentProcessId "
f"FROM Win32_Process WHERE Name='{name}'": name for name in names}
def query(wql):
name = queries[wql]
queried.append(name)
return ([SimpleNamespace(ProcessId='456', ParentProcessId='1',
return ([SimpleNamespace(ProcessId='456', ParentProcessId='1', Name=name,
ExecutablePath=f'C:\\Mentor\\{name}', CommandLine=f'{name} target')]
if name == owner else [])
def service(moniker):
assert moniker == 'winmgmts:'
return SimpleNamespace(ExecQuery=query)
monkeypatch.setattr(win32com.client, 'GetObject', service)
from cbb_refresh_verify import owner_probe
import subprocess
monkeypatch.setattr(owner_probe.subprocess, 'run', lambda command, **kw:
subprocess.CompletedProcess(command, owner_probe.owner_probe_main(command[-1])))
# Keep pcb_processes, _processes, _process_details and release validation real.
state = repair_release_state(request, target, complete_native_success(target))
assert 'error' not in state