Improved coverage reporting

This commit is contained in:
David Harris 2023-03-19 10:24:35 -07:00
parent 02e7e7d011
commit 563f243de3
3 changed files with 13 additions and 5 deletions

8
.gitignore vendored
View File

@ -103,4 +103,10 @@ external
sim/results
tests/wally-riscv-arch-test/riscv-test-suite/rv*i_m/I/src/*.S
tests/wally-riscv-arch-test/riscv-test-suite/rv*i_m/I/Makefrag
sim/branch_BP_GSHARE10.log
sim/branch_BP_GSHARE16.log
sim/cov/
sim/covhtmlreport/
sim/imperas.log
sim/results-error/
sim/test1.rep

View File

@ -126,6 +126,7 @@ for test in ahbTests:
grepstr="All tests ran without failures")
configs.append(tc)
#tests64gc = ["arch64i", "arch64c", "arch64m"]
tests64gc = ["arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", "arch64zi", "wally64a", "wally64periph", "wally64priv"]
if (coverage): # delete all but 64gc tests when running coverage
configs = []
@ -217,8 +218,9 @@ def main():
if coverage:
print('Generating coverage report')
os.system('vcover merge -out cov/cov.ucdb cov/rv64gc_arch64i.ucdb cov/rv64gc*.ucdb -logfile cov/log')
os.system('vcover report -details cov/cov.ucdb > cov/rv64gc_coverage.rpt')
os.system('vcover report -html cov/cov.ucdb')
os.system('vcover report -details cov/cov.ucdb > cov/rv64gc_coverage_details.rpt')
os.system('vcover report -below 100 cov/cov.ucdb > cov/rv64gc_coverage.rpt')
os.system('vcover report -details -threshH 100 -html cov/cov.ucdb')
# Count the number of failures
if num_fail:
print(f"{bcolors.FAIL}Regression failed with %s failed configurations{bcolors.ENDC}" % num_fail)

View File

@ -138,8 +138,8 @@ if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} {
}
if {$coverage} {
do coverage-exclusions.do
coverage save -instance /testbench/dut cov/${1}_${2}.ucdb
do coverage-exclusions-rv64gc.do # beware: this assumes testing the rv64gc configuration
coverage save -instance /testbench/dut/core cov/${1}_${2}.ucdb
}
# These aren't doing anything helpful