From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: CrossedCarpet <crossedcarpet@hotmail.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"Guo, Gua" <gua.guo@intel.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] gTest code coverage
Date: Tue, 19 Sep 2023 18:09:49 +0000 [thread overview]
Message-ID: <CO1PR11MB49293AA8A3CBF2E7CF6C1DF4D2FAA@CO1PR11MB4929.namprd11.prod.outlook.com> (raw)
In-Reply-To: <17815.1695141876971718856@groups.io>
[-- Attachment #1: Type: text/plain, Size: 2200 bytes --]
Gua may be able to help.
What error do you get trying to use stuart commands?
Mike
From: CrossedCarpet <crossedcarpet@hotmail.com>
Sent: Tuesday, September 19, 2023 9:45 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
Subject: Re: [edk2-devel] gTest code coverage
Thank you for your reply!
Unfortunately, I was aware of that documentation, I quoted it in my original 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 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/Library/CustomLibs/StringUtils/StringUtils/OUTPUT/static_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 = --coverage -fprofile-arcs -ftest-coverage
# or
GCC:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/$(MODULE_NAME_GUID) -fprofile-arcs -ftest-coverage -m64 -no-pie
But to no avail, I've only been able to generate 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_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.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108854): https://edk2.groups.io/g/devel/message/108854
Mute This Topic: https://groups.io/mt/101383490/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 5546 bytes --]
next prev parent reply other threads:[~2023-09-19 18:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 16:48 [edk2-devel] gTest code coverage CrossedCarpet
2023-09-15 19:12 ` Michael D Kinney
2023-09-19 16:44 ` CrossedCarpet
2023-09-19 18:09 ` Michael D Kinney [this message]
2023-09-19 22:42 ` Guo, Gua
2023-09-21 10:25 ` CrossedCarpet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CO1PR11MB49293AA8A3CBF2E7CF6C1DF4D2FAA@CO1PR11MB4929.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox