diff mbox series

docs: add boot coverage report

Message ID 20190722065411.30577-1-stewart@linux.ibm.com
State New
Headers show
Series docs: add boot coverage report | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (dab352eecb1dac78112c67d322655e0eae0a16ba)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Stewart Smith July 22, 2019, 6:54 a.m. UTC
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(-)
diff mbox series

Patch

diff --git a/doc/ghpages-skeleton/index.html b/doc/ghpages-skeleton/index.html
index ea5ed8ab927b..6ae31b625f2a 100644
--- a/doc/ghpages-skeleton/index.html
+++ b/doc/ghpages-skeleton/index.html
@@ -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>
diff --git a/opal-ci/Dockerfile-fedora30 b/opal-ci/Dockerfile-fedora30
index 17ba79bc952a..753ae7a4a995 100644
--- a/opal-ci/Dockerfile-fedora30
+++ b/opal-ci/Dockerfile-fedora30
@@ -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 )
diff --git a/opal-ci/build-docs.sh b/opal-ci/build-docs.sh
index e7cc87c9b503..66cc13f76529 100755
--- a/opal-ci/build-docs.sh
+++ b/opal-ci/build-docs.sh
@@ -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
diff --git a/test/Makefile.check b/test/Makefile.check
index c2137252b9b7..3a27bc1fcf7e 100644
--- a/test/Makefile.check
+++ b/test/Makefile.check
@@ -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, $@)
diff --git a/test/make-boot-coverage-report.sh b/test/make-boot-coverage-report.sh
index 210880ee62e5..2ed9cf5f417d 100755
--- a/test/make-boot-coverage-report.sh
+++ b/test/make-boot-coverage-report.sh
@@ -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