#!/usr/bin/env bash coverdata_dir=@abs_builddir@/logs coverdata_file=${coverdata_dir}/@PACKAGE_NAME@.coverdata coverdata_app=@PACKAGE_NAME@ analyze_coverdata=@abs_builddir@/analyze_coverdata.escript color_0="ff2200" color_5="ff3800" color_10="ff4e00" color_15="ff6400" color_20="ff7a00" color_25="ff9000" color_30="ffa500" color_35="ffbb00" color_40="ffd100" color_45="ffe700" color_50="fdfc00" color_55="ecff00" color_60="d6ff00" color_65="c0ff00" color_70="aaff00" color_75="94ff00" color_80="7eff00" color_85="69ff00" color_90="53ff00" color_95="3dff00" color_100="27ff00" output_analyze_coverdata () { pretty_name=$(echo $coverdata_app | tr "_" " ") # Generate covered modules data. We ignore stdout because cover # writes some useless logs. $analyze_coverdata $coverdata_file > /dev/null covered_mods=${coverdata_app}_covered_mods # Prepare index block. index=${coverdata_dir}/cover.html timestamp=$(date +'%Y-%m-%d at %H:%M:%S') cat << EOF > "$index"
Date: ${timestamp}
Module | Coverage (%) | Coveraged (Lines) | Not coveraged (Lines) | |
---|---|---|---|---|
${module} | ${percent} % | ${covered} | ${not_covered} | |
Total | ${total_percent} % | ${total_covered} | ${total_not_covered} |