From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id CEA187803E0 for ; Tue, 19 Sep 2023 16:44:38 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=6iNvuC3aMFuSagT1iLQeNe82r/JrWxltLF0IURCEmbg=; c=relaxed/simple; d=groups.io; h=Subject:To:From:User-Agent:MIME-Version:Date:References:In-Reply-To:Message-ID:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1695141877; v=1; b=qdLkj9OHtaCv+8udpN6+byK8zS48IzCbXJGFsy7fikLhX4lFTYshBr2fekeSiqm7kFOV5Z3Y 0rHlEnBQs3CgshsCcU8kTDDGZrvcQQHxAM7uSqfdN1ChyG0sYL2o5x09YxFDiXPyGCNlP5iJVun 2yEn+ZfpL6M6D1lQvDdKlrdM= X-Received: by 127.0.0.2 with SMTP id Mv8OYY7687511x1bpXPyOJPv; Tue, 19 Sep 2023 09:44:37 -0700 Subject: Re: [edk2-devel] gTest code coverage To: Michael D Kinney ,devel@edk2.groups.io From: "CrossedCarpet" X-Originating-Location: New York, New York, US (149.88.20.215) X-Originating-Platform: Linux Chrome 116 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 19 Sep 2023 09:44:36 -0700 References: In-Reply-To: Message-ID: <17815.1695141876971718856@groups.io> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,crossedcarpet@hotmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: gfRx0tnNyEHmXW3ObHQ0pBACx7686176AA= Content-Type: multipart/alternative; boundary="x789egN6VyhO84YvEa9o" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=qdLkj9OH; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=hotmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io --x789egN6VyhO84YvEa9o Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thank you for your reply! Unfortunately, I was aware of that documentation, I quoted it in my origina= l email when asking for help in its interpretation. I have been using the build system instead of the stuart abstraction. If I = try using it in my current setup I get a bug saying my HostTestPkg is unsup= ported. Anyhow, I'd love to figure out why isn't the build system generating these = gcno and gcda files anymore. When building my LibraryClasses this is the command that gets run: "gcc" -o /edk2/edk2/Build/CustomLibs/DEBUG_GCC/X64/GoogleTestStringUtilsLib= -m64 -no-pie -Wl,--start-group,@/edk2/edk2/Build/CustomLibs/DEBUG_GCC/X64/= MdePkg/Test/GoogleTest/Library/CustomLibs/StringUtils/StringUtils/OUTPUT/st= atic_library_files.lst,--end-group -lgcov -lpthread -lstdc++ -lm I have been able to modify it in my own HostTestPkg.dsc with: [BuildOptions.common.EDKII.HOST_APPLICATION] GCC:*_GCC5_*_CC_FLAGS =3D --coverage -fprofile-arcs -ftest-coverage # or GCC:*_*_X64_DLINK_FLAGS=C2=A0 =3D=3D -o $(BIN_DIR)/$(MODULE_NAME_GUID) -fpr= ofile-arcs -ftest-coverage -m64 -no-pie But to no avail, I've only been able to generate weird intermediate files l= ike: GoogleTestStringUtilsLib.ltrans0.ltrans.gcno This is how I invoke the build command: build -a X64 -b DEBUG -t GCC -D DISABLE_NEW_DEPRECATED_INTERFACES -p MdePkg= /Test/GoogleTest/Library/CustomLibs/HostTestPkg.dsc" Help is greatly appreciated. I believe I'm overthinking it and the solution= is more straightforward than this. C.C. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108851): https://edk2.groups.io/g/devel/message/108851 Mute This Topic: https://groups.io/mt/101383490/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --x789egN6VyhO84YvEa9o Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Thank you for your reply!
Unfortunately, I was aware of that docume= ntation, I quoted it in my original email when asking for help in its inter= pretation.

I have been using the build system instead of the stu= art abstraction. If I try using it in my current setup I get a bug saying m= y HostTestPkg is unsupported.
Anyhow, I'd love to figure out why isn't= the build system generating these gcno and gcda files anymore. 

When building my LibraryClasses this is the command that gets run:

"gcc" -o /edk2/edk2/Build/= CustomLibs/DEBUG_GCC/X64/GoogleTestStringUtilsLib -m64 -no-pie -Wl,--start-= group,@/edk2/edk2/Build/CustomLibs/DEBUG_GCC/X64/MdePkg/Test/GoogleTest/Lib= rary/CustomLibs/StringUtils/StringUtils/OUTPUT/static_library_files.lst,--e= nd-group -lgcov -lpthread -lstdc++ -lm

I have been able to modify it in my own HostTestPkg.d= sc with:

[BuildOptions.common.EDK= II.HOST_APPLICATION]
  GCC:*_GCC5_*_CC_F= LAGS =3D --coverage -fprofile-arcs -ftest-coverage
# or
  GCC:*_*_X64_DLINK_FLAGS  =3D=3D -o $(BIN_DIR)/$(MO= DULE_NAME_GUID)  -fprofile-= arcs -ftest-coverage 
But to no avail, I've only been able to ge= nerate weird intermediate files like: GoogleTestStringUtilsLib.ltrans0.ltrans.gcno

This = is how I invoke the build command:

build -a X64 -b DEBUG -t GCC -D DISABLE_NEW_DEPR= ECATED_INTERFACES -p MdePkg/Test/GoogleTest/Library/CustomLibs/HostTestPkg.= dsc"

= Help is greatly appreciated. I believe I'm overthinking it and the solution= is more straightforward than this.
C.C. 
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#108851) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--x789egN6VyhO84YvEa9o--