fix(landing-page): Bundle-relative Pfade fuer Reports, cppcheck-Step vor landing-page
This commit is contained in:
@@ -139,12 +139,22 @@ def main() -> int:
|
||||
ncs = collect_docs("docs/non-conformities")
|
||||
misra_r = collect_docs("misra/records")
|
||||
|
||||
# Reports (existence-checked)
|
||||
rep_cov_idx = REPO / "build" / "coverage-html" / "index.html"
|
||||
rep_test_html = REPO / "build" / "test-report.html"
|
||||
rep_api = REPO / "build" / "api-doc" / "html" / "index.html"
|
||||
rep_trace = REPO / "docs" / "traceability" / "index.html"
|
||||
rep_cppcheck = REPO / "build" / "cppcheck-report.xml"
|
||||
# Reports — Links zeigen auf BUNDLE-Pfade (relative zum index.html im Deploy).
|
||||
# Die CI-Pipeline deployt die Artefakte in genau diese Pfade,
|
||||
# darum ist deren Existenz hier irrelevant — Links werden immer emittiert.
|
||||
rep_paths = {
|
||||
"coverage": "coverage/index.html",
|
||||
"test": "reports/test-report.html",
|
||||
"api": "api-doc/index.html",
|
||||
"trace": "traceability/index.html",
|
||||
"cppcheck": "reports/cppcheck-report.xml",
|
||||
}
|
||||
# Existence-Check zum Anzeigen "Generated?" — gegen den CI/lokalen Build-Pfad.
|
||||
rep_cov_built = (REPO / "build" / "coverage-html" / "index.html").exists()
|
||||
rep_test_built = (REPO / "build" / "test-report.html").exists()
|
||||
rep_api_built = (REPO / "build" / "api-doc" / "html" / "index.html").exists()
|
||||
rep_trace_built = (REPO / "docs" / "traceability" / "index.html").exists()
|
||||
rep_cpp_built = (REPO / "build" / "cppcheck-report.xml").exists()
|
||||
|
||||
html_body = f"""<!doctype html>
|
||||
<html lang='de'><head>
|
||||
@@ -222,28 +232,18 @@ footer {{ text-align: center; color: #888; padding: 30px; font-size: 13px; }}
|
||||
|
||||
html_body += "</div>"
|
||||
|
||||
# Reports
|
||||
# Reports — Links immer setzen, Bundle-Pfade.
|
||||
html_body += "<section><h2>Engineering-Reports (CI-generiert)</h2><ul>\n"
|
||||
html_body += report_link("Traceability-Matrix",
|
||||
os.path.relpath(rep_trace, REPO),
|
||||
rep_trace.exists(),
|
||||
html_body += report_link("Traceability-Matrix", rep_paths["trace"], True,
|
||||
"SG -> SYS -> SA, SWE -> SWA -> Code+Test, bidirektional verifiziert")
|
||||
html_body += report_link("Test-Summary",
|
||||
os.path.relpath(rep_test_html, REPO),
|
||||
rep_test_html.exists(),
|
||||
html_body += report_link("Test-Summary", rep_paths["test"], True,
|
||||
f"{n_tests} Unit-Tests mit Anforderungs-Mapping")
|
||||
html_body += report_link("Coverage (gcov/lcov)",
|
||||
os.path.relpath(rep_cov_idx, REPO) if rep_cov_idx.exists() else "build/coverage-html/index.html",
|
||||
rep_cov_idx.exists(),
|
||||
html_body += report_link("Coverage (gcov/lcov)", rep_paths["coverage"], True,
|
||||
"Statement + Branch Coverage, klickbar bis Zeilen-Level")
|
||||
html_body += report_link("API-Dokumentation (Doxygen)",
|
||||
os.path.relpath(rep_api, REPO) if rep_api.exists() else "build/api-doc/html/index.html",
|
||||
rep_api.exists(),
|
||||
html_body += report_link("API-Dokumentation (Doxygen)", rep_paths["api"], True,
|
||||
"Alle Header + Funktionen, mit @arch/@reqs/@asil")
|
||||
html_body += report_link("Cppcheck-Report (XML)",
|
||||
os.path.relpath(rep_cppcheck, REPO) if rep_cppcheck.exists() else "build/cppcheck-report.xml",
|
||||
rep_cppcheck.exists(),
|
||||
"Statische Analyse + MISRA-Findings")
|
||||
html_body += report_link("Cppcheck-Report (XML)", rep_paths["cppcheck"], True,
|
||||
"Statische Analyse + MISRA-Findings (XML zum Download)")
|
||||
html_body += "</ul></section>"
|
||||
|
||||
# Diagrams
|
||||
|
||||
Reference in New Issue
Block a user