diff --git a/scripts/generate_coverage_html.sh b/scripts/generate_coverage_html.sh index 1eec3ae..423790d 100755 --- a/scripts/generate_coverage_html.sh +++ b/scripts/generate_coverage_html.sh @@ -14,136 +14,19 @@ cat > "$OUTPUT_DIR/index.html" <<'HTMLHEADER' Branch Coverage Report -
-

🎯 Branch Coverage Report

-

Generated from random simulation coverage analysis

+

Branch Coverage Report

+

Generated from random simulation coverage analysis

-
-

Overall Coverage Summary

+

Overall Coverage Summary

HTMLHEADER # Calculate totals @@ -167,36 +50,21 @@ done if [ "$TOTAL_BRANCHES" -gt 0 ]; then COVERAGE_PERCENT=$((TAKEN_BRANCHES * 100 / TOTAL_BRANCHES)) - # Determine coverage class - if [ "$COVERAGE_PERCENT" -lt 30 ]; then - COVERAGE_CLASS="coverage-low" - elif [ "$COVERAGE_PERCENT" -lt 70 ]; then - COVERAGE_CLASS="coverage-medium" - else - COVERAGE_CLASS="coverage-high" - fi - cat >> "$OUTPUT_DIR/index.html" < - Total Branches: $TOTAL_BRANCHES
- Branches Taken: $TAKEN_BRANCHES
- Coverage: ${COVERAGE_PERCENT}% -
-
-
-
${COVERAGE_PERCENT}%
-
-
+

+ Total Branches: $TOTAL_BRANCHES
+ Branches Taken: $TAKEN_BRANCHES
+ Coverage: ${COVERAGE_PERCENT}% +

-

Coverage by File

- - - - - - - - +

Coverage by File

+
FileBranches TakenTotal BranchesCoverageVisual
+ + + + + + HTMLSUMMARY # Generate table rows for each file @@ -212,14 +80,6 @@ HTMLSUMMARY percentage=$((taken * 100 / branches)) - if [ "$percentage" -lt 30 ]; then - bar_class="coverage-low" - elif [ "$percentage" -lt 70 ]; then - bar_class="coverage-medium" - else - bar_class="coverage-high" - fi - # Generate individual file report file_html="${filename}.html" echo "Generating report for $filename..." @@ -231,30 +91,21 @@ HTMLSUMMARY Coverage: $filename -
- ← Back to Summary -

Coverage Report: $filename

-
- Branches Taken: $taken / $branches ($percentage%)
-
-
+    

← Back to Summary

+

Coverage: $filename

+

Branches Taken: $taken / $branches ($percentage%)

+
 FILEHEADER
 
                 # Process the gcov file and add source code with branch info
@@ -308,25 +159,18 @@ FILEHEADER
 
                 cat >> "$OUTPUT_DIR/$file_html" <<'FILEFOOTER'
 
-
FILEFOOTER # Add row to main index cat >> "$OUTPUT_DIR/index.html" < - - - - - - + + + + + + TABLEROW fi fi @@ -334,17 +178,14 @@ TABLEROW # Close HTML cat >> "$OUTPUT_DIR/index.html" <<'HTMLFOOTER' -
FileBranches TakenTotal BranchesCoverage %
$filename$taken$branches${percentage}% -
-
-
${percentage}%
-
-
$filename$taken$branches${percentage}%
- + HTMLFOOTER else cat >> "$OUTPUT_DIR/index.html" <<'HTMLFOOTER' -

No branch coverage data found.

- - +

No branch coverage data found.

HTMLFOOTER