#!/bin/bash

# ParU, Copyright (c) 2022-2024, Mohsen Aznaveh and Timothy A. Davis,
# All Rights Reserved.
# SPDX-License-Identifier: GPL-3.0-or-later

echo "Test coverage summary" > cov.out
echo '=============================================================' >> cov.out

for file in ../Source/*
do
	gcov -o . $file >& /dev/null
done

for file in ?ar?_*.?cov
do
	echo $file >> cov.out
	grep "#####" $file | grep -v "__dev" | grep -v "__major" | \
	    grep -v "#####:[ ]*[0-9]*:[{}]" | grep -v DEAD >> cov.out
	echo '=========================================================' >> cov.out
done

echo -n "statements not tested: "
grep "\#\#\#\#\#:" ?ar?_*v | grep -v DEAD | wc -l
echo " "

set status=0
