Commit 12ad3131 authored by Nikos Mavrogiannopoulos's avatar Nikos Mavrogiannopoulos

coverage badge: generate line coverage

Previously we were reporting the highest number from the coverage html.
We now switch to the first number which is the line coverage.

Resolves: #70Signed-off-by: Nikos Mavrogiannopoulos's avatarNikos Mavrogiannopoulos <nmav@gnutls.org>
parent 5b4a152d
......@@ -5,7 +5,7 @@ textwidth=$(($(echo -n "$text"|wc -m) * 7 + 6))
numwidth=54
totalwidth=$(($textwidth + $numwidth))
coverage=$(grep -m 1 'headerCovTableEntryHi.*[0-9]*' libidn2-*-coverage/index.html|sed 's/^.*>\([0-9]\+\.[0-9]\+\).*/\1/');
coverage=$(grep -m 1 'headerCovTableEntry[a-zA-Z].*[0-9]*' libidn2-*-coverage/index.html|sed 's/^.*>\([0-9]\+\.[0-9]\+\).*/\1/');
coverage=$(printf %.2f $coverage)
inum=$(echo $coverage|cut -d'.' -f1)
if [ -z "$inum" ]; then inum="0"; fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment