~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/skiboot/test/make-boot-coverage-report.sh

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
# We cheat and do this in a shell script so I don't go Makefile crazy.
 
4
 
 
5
SKIBOOT_GCOV_ADDR=`perl -e "printf '0x%x', 0x30000000 + 0x\`grep gcov_info_list skiboot.map|cut -f 1 -d ' '\`"`
 
6
 
 
7
LCOV_INFO_FILES=""
 
8
 
 
9
function process_dump {
 
10
    ./extract-gcov $1 $SKIBOOT_GCOV_ADDR
 
11
    lcov -q -b . -d . -c -o $2 --gcov-tool ${CROSS}gcov
 
12
    LCOV_INFO_FILES="$LCOV_INFO_FILES -a $2"
 
13
    find .|grep '\.gcda$'|xargs rm -f
 
14
}
 
15
    
 
16
 
 
17
find .|grep '\.gcda$'|xargs rm -f
 
18
 
 
19
for i in $BOOT_TESTS; do
 
20
    if [ -f ./external/mambo/skiboot-$i.dump ]; then
 
21
        process_dump ./external/mambo/skiboot-$i.dump skiboot-$i.info
 
22
    fi
 
23
    if [ -f ./skiboot-$i.dump ]; then
 
24
        process_dump ./skiboot-$i.dump skiboot-$i.info
 
25
    fi
 
26
done
 
27
 
 
28
if [ -z "$LCOV_INFO_FILES" ]; then
 
29
    echo "ERROR: no lcov files found"
 
30
    exit 1;
 
31
fi
 
32
 
 
33
lcov -q -b . -d . --gcov-tool ${CROSS}gcov -o skiboot-boot.info $LCOV_INFO_FILES
 
34
 
 
35
genhtml -o boot-coverage-report skiboot-boot.info