Преглед изворни кода

fix: read TD CDC pass marker from console log

codex пре 3 месеци
родитељ
комит
0eb80d02fc
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      tools/prod2u_p4_harness.py

+ 6 - 1
tools/prod2u_p4_harness.py

@@ -3416,13 +3416,18 @@ def td_build_payload(
         ),
         input_register_count=syn_ireg.get("used") if isinstance(syn_ireg, Mapping) else None,
     )
+    syn_console = staged.syn / f"{PROFILE}_syn.console.log"
+    syn_cdc_pass = "CDC_GATE_PASS=1" in syn.stdout or (
+        syn_console.is_file()
+        and "CDC_GATE_PASS=1" in syn_console.read_text(encoding="utf-8", errors="replace")
+    )
     syn_ok = (
         syn.returncode == 0
         and not td_log_has_error(syn.stdout, syn.stderr)
         and not td_log_has_cdc_gate_failure(syn.stdout, syn.stderr)
         and td_critical_warning_count(syn.stdout, syn.stderr) == 0
         and syn_cdc["status"] == "pass"
-        and "CDC_GATE_PASS=1" in syn.stdout
+        and syn_cdc_pass
     )
     syn_artifact_usable = td_stage_artifact_usable(
         syn,