@@ -12,6 +12,7 @@
<ul>
<li><a href="doc/index.html">Skiboot Documentation</a></li>
<li><a href="coverage-report/">gcov coverage report for unittests</a></li>
+<li><a href="boot-coverage-report/">gcov coverage report for booting (simulators)</a></li>
</ul>
</body>
</html>
@@ -1,6 +1,8 @@
FROM fedora:30
RUN dnf -y update
RUN dnf -y install --allowerasing wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel gcc-powerpc64-linux-gnu
+RUN dnf -y install --allowerasing python3-dnf-plugins-core
+RUN dnf -y builddep qemu
# for building documentation
RUN dnf -y install python-pip
# for GCOV coverage reports (need testing due to https://bugzilla.redhat.com/show_bug.cgi?id=1668843 )
@@ -13,11 +13,16 @@ git clone --depth=1 -b v1.4.4 https://git.kernel.org/pub/scm/utils/dtc/dtc.git
(cd dtc; make -j${MAKE_J})
export PATH=`pwd`/dtc:$PATH
+(cd opal-ci; ./build-qemu-powernv.sh)
+export QEMU_BIN=$(pwd)/opal-ci/qemu/ppc64-softmmu/qemu-system-ppc64
+
make -j${MAKE_J} SKIBOOT_GCOV=1 coverage-report
+make SKIBOOT_GCOV=1 boot-coverage-report
pip install -r doc/requirements.txt
(cd doc; make html)
cp -r doc/ghpages-skeleton doc/_build/ghpages
mv coverage-report doc/_build/ghpages/
+mv boot-coverage-report doc/_build/ghpages/
mv doc/_build/html doc/_build/ghpages/doc
@@ -17,7 +17,7 @@ boot-check-%: skiboot.lid skiboot.map
boot-tests: boot-check $(OP_BUILD_BOOT_CHECK:%=boot-check-%)
boot-coverage-report: boot-tests extract-gcov skiboot.map all-boot-hardware
- $(call Q, BOOT TEST , CROSS=$(CROSS) BOOT_TESTS="hello_world boot_test ${OP_BUILD_BOOT_CHECK} ${FSP_GCOV_MACHINES}" ./test/make-boot-coverage-report.sh, $@)
+ $(call Q, BOOT TEST , CROSS="$(CROSS)" BOOT_TESTS="hello_world boot_test ${OP_BUILD_BOOT_CHECK} ${FSP_GCOV_MACHINES}" ./test/make-boot-coverage-report.sh, $@)
boot-fsp-hardware-%: skiboot.lid skiboot.map
$(call Q, BOOT TEST , ./external/boot-tests/boot_test.sh -v -p -b fsp -t $(@:boot-fsp-hardware-%=%) -1 skiboot.lid, $@)
@@ -6,9 +6,11 @@ SKIBOOT_GCOV_ADDR=$(perl -e "printf '0x%x', 0x30000000 + 0x$(grep gcov_info_list
LCOV_INFO_FILES=""
+CROSS=$(echo ${CROSS} | sed -e 's/ccache //')
+
function process_dump {
./extract-gcov $1 $SKIBOOT_GCOV_ADDR
- lcov -q -b . -d . -c -o $2 --gcov-tool ${CROSS}gcov
+ 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
}
@@ -25,11 +27,15 @@ for i in $BOOT_TESTS; do
fi
done
+for f in $EXT_GCOV_DUMPS; do
+ process_dump $f skiboot-$(basename $f).info
+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
+lcov -q -b . -d . --gcov-tool "${CROSS}gcov" -o skiboot-boot.info $LCOV_INFO_FILES
genhtml -o boot-coverage-report skiboot-boot.info
Signed-off-by: Stewart Smith <stewart@linux.ibm.com> --- doc/ghpages-skeleton/index.html | 1 + opal-ci/Dockerfile-fedora30 | 2 ++ opal-ci/build-docs.sh | 5 +++++ test/Makefile.check | 2 +- test/make-boot-coverage-report.sh | 10 ++++++++-- 5 files changed, 17 insertions(+), 3 deletions(-)