diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/skiboot/test/make-boot-coverage-report.sh | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/skiboot/test/make-boot-coverage-report.sh')
-rwxr-xr-x | roms/skiboot/test/make-boot-coverage-report.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/roms/skiboot/test/make-boot-coverage-report.sh b/roms/skiboot/test/make-boot-coverage-report.sh new file mode 100755 index 000000000..210880ee6 --- /dev/null +++ b/roms/skiboot/test/make-boot-coverage-report.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# We cheat and do this in a shell script so I don't go Makefile crazy. + +SKIBOOT_GCOV_ADDR=$(perl -e "printf '0x%x', 0x30000000 + 0x$(grep gcov_info_list skiboot.map|cut -f 1 -d ' ')") + +LCOV_INFO_FILES="" + +function process_dump { + ./extract-gcov $1 $SKIBOOT_GCOV_ADDR + lcov -q -b . -d . -c -o $2 --gcov-tool ${CROSS}gcov + LCOV_INFO_FILES="$LCOV_INFO_FILES -a $2" + find .|grep '\.gcda$'|xargs rm -f +} + + +find .|grep '\.gcda$'|xargs rm -f + +for i in $BOOT_TESTS; do + if [ -f ./external/mambo/skiboot-$i.dump ]; then + process_dump ./external/mambo/skiboot-$i.dump skiboot-$i.info + fi + if [ -f ./skiboot-$i.dump ]; then + process_dump ./skiboot-$i.dump skiboot-$i.info + fi +done + +if [ -z "$LCOV_INFO_FILES" ]; then + echo "ERROR: no lcov files found" + exit 1; +fi + +lcov -q -b . -d . --gcov-tool ${CROSS}gcov -o skiboot-boot.info $LCOV_INFO_FILES + +genhtml -o boot-coverage-report skiboot-boot.info |