From patchwork Mon Jul 22 06:54:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1134737 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45sXQw6KJwz9s3l for ; Mon, 22 Jul 2019 16:54:32 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45sXQw0wfGzDqTG for ; Mon, 22 Jul 2019 16:54:32 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45sXQn3795zDqP7 for ; Mon, 22 Jul 2019 16:54:24 +1000 (AEST) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6M6q2T9104566 for ; Mon, 22 Jul 2019 02:54:21 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tw6j0w0hs-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 22 Jul 2019 02:54:21 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 22 Jul 2019 07:54:20 +0100 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 22 Jul 2019 07:54:17 +0100 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x6M6sG9S58655126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 22 Jul 2019 06:54:16 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8C407BE04F for ; Mon, 22 Jul 2019 06:54:16 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 29CFCBE054 for ; Mon, 22 Jul 2019 06:54:16 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.29]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP for ; Mon, 22 Jul 2019 06:54:16 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id AF048478272; Mon, 22 Jul 2019 16:54:12 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Mon, 22 Jul 2019 16:54:11 +1000 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19072206-0016-0000-0000-000009D2E04A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011473; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000287; SDB=6.01235699; UDB=6.00651229; IPR=6.01017049; MB=3.00027836; MTD=3.00000008; XFM=3.00000015; UTC=2019-07-22 06:54:18 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19072206-0017-0000-0000-0000441DCE94 Message-Id: <20190722065411.30577-1-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-22_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907220082 Subject: [Skiboot] [PATCH] docs: add boot coverage report X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- 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 --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 @@ 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