重构UCD模块

This commit is contained in:
xinzhu.yin
2026-06-11 15:53:41 +08:00
parent 38222ff002
commit cc7218411c
11 changed files with 395 additions and 188 deletions

View File

@@ -24,14 +24,9 @@ class PatternService:
def _build_apply_config_error(self, test_type):
timing = self.app.config.current_test_types.get(test_type, {}).get("timing", "-")
detail = ""
try:
ctrl = getattr(self.app.signal_service.device, "raw_controller", None)
if ctrl is not None:
d = getattr(ctrl, "last_error", None)
if d:
detail = f", detail={d}"
except Exception:
pass
err = self.app.signal_service.last_error
if err:
detail = f", detail={err}"
return f"UCD profile apply_config failed for {test_type}, timing={timing}{detail}"
def prepare_session(self, mode, *, test_type=None, log_details=False):