merge: 补齐 Keil 日志产物解析

This commit is contained in:
root
2026-07-21 15:12:47 +02:00
2 changed files with 2 additions and 2 deletions
@@ -28,7 +28,7 @@ describe("HWPOD workspace presentation", () => {
it("projects the real Keil terminal exit code and bounded logs", () => { it("projects the real Keil terminal exit code and bounded logs", () => {
const stdout = [ const stdout = [
JSON.stringify({ event: "started", command: "build", mode: "wait" }), JSON.stringify({ event: "started", command: "build", mode: "wait" }),
JSON.stringify({ status: "completed", return_code: 0, errors: 0, warning_count: 2, elapsed_ms: 7165, message: "Build completed successfully", result: { hex_file: "F:\\out.hex", axf_file: "F:\\out.axf", build_log: "F:\\build.log" } }, null, 2), JSON.stringify({ status: "completed", return_code: 0, errors: 0, warning_count: 2, elapsed_ms: 7165, message: "Build completed successfully", hex_file: "F:\\out.hex", axf_file: "F:\\out.axf", _log_file: "F:\\build.log" }, null, 2),
].join("\n"); ].join("\n");
const view = presentBuildOperation({ const view = presentBuildOperation({
ok: true, ok: true,
@@ -62,7 +62,7 @@ export function presentBuildOperation(operation: HwpodOperationResponse | null,
const artifacts = [ const artifacts = [
["HEX", parsedResult.hex_file ?? parsedResult.hexFile ?? parsed.hex_file ?? parsed.hexFile], ["HEX", parsedResult.hex_file ?? parsedResult.hexFile ?? parsed.hex_file ?? parsed.hexFile],
["AXF", parsedResult.axf_file ?? parsedResult.axfFile ?? parsed.axf_file ?? parsed.axfFile], ["AXF", parsedResult.axf_file ?? parsedResult.axfFile ?? parsed.axf_file ?? parsed.axfFile],
["构建日志", parsedResult.log_file ?? parsedResult.logFile ?? parsedResult.build_log ?? parsedResult.buildLog ?? parsed.log_file ?? parsed.logFile ?? parsed.build_log ?? parsed.buildLog], ["构建日志", parsedResult._log_file ?? parsedResult.log_file ?? parsedResult.logFile ?? parsedResult.build_log ?? parsedResult.buildLog ?? parsed._log_file ?? parsed.log_file ?? parsed.logFile ?? parsed.build_log ?? parsed.buildLog],
].flatMap(([kind, path]) => typeof path === "string" && path.trim() ? [{ kind: String(kind), path: path.trim() }] : []); ].flatMap(([kind, path]) => typeof path === "string" && path.trim() ? [{ kind: String(kind), path: path.trim() }] : []);
const asyncQueued = parsed.accepted === true && ["queued", "running", "accepted"].includes(toolStatus); const asyncQueued = parsed.accepted === true && ["queued", "running", "accepted"].includes(toolStatus);
const failed = operation.error != null const failed = operation.error != null