File: make-boot-coverage-report.sh

package info (click to toggle)
skiboot 5.3.3-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 13,280 kB
  • ctags: 13,840
  • sloc: ansic: 77,199; asm: 1,002; sh: 997; cpp: 894; tcl: 408; makefile: 325; python: 166; pascal: 65
file content (35 lines) | stat: -rwxr-xr-x 933 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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