From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io, pedro.falcato@gmail.com
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
Sean Brogan <sean.brogan@microsoft.com>
Subject: Re: [edk2-devel] [PATCH 2/2] UnitTestFrameworkPkg/Readme.md: Remove the mention of the gtest main() limitation
Date: Fri, 1 Dec 2023 12:10:11 -0500 [thread overview]
Message-ID: <730cdbbc-ef36-47ce-b0c7-19c6dd29d6e5@linux.microsoft.com> (raw)
In-Reply-To: <20231130224214.86027-3-pedro.falcato@gmail.com>
Hi Pedro,
PatchCheck flagged the subject length:
UnitTestFrameworkPkg/Readme.md: Remove the mention of the gtest main()
limitation
The commit message format is not valid:
* First line of commit message (subject line) is too long (81 >= 76).
https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-Format
The code passed all checks.
I think the following is also clear enough:
"UnitTestFrameworkPkg/Readme.md: Remove the gtest main() limitation"
Thanks,
Michael
On 11/30/2023 5:42 PM, Pedro Falcato wrote:
> As of the previous commit, this limitation is no longer a thing.
> You can now write gtest unit tests with multiple files and no need for
> any hack such as #include.
>
> Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Michael Kubacki <mikuback@linux.microsoft.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> ---
> UnitTestFrameworkPkg/ReadMe.md | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/UnitTestFrameworkPkg/ReadMe.md b/UnitTestFrameworkPkg/ReadMe.md
> index 7da6a320a7f1..d6a3e0c15a2b 100644
> --- a/UnitTestFrameworkPkg/ReadMe.md
> +++ b/UnitTestFrameworkPkg/ReadMe.md
> @@ -1096,22 +1096,6 @@ int main(int argc, char* argv[]) {
> }
> ```
>
> -However, while GoogleTest does not require test suites or test cases to be
> -registered, there is still one rule within EDK II that currently needs to be
> -followed. This rule is that all tests for a given GoogleTest application must
> -be contained within the same source file that contains the `main()` function
> -shown above. These tests can be written directly in the file or a `#include`
> -can be used to add them into the file indirectly.
> -
> -The reason for this is due to EDK II taking the host application INF file and
> -first compiling all of its source files into a static library. This static
> -library is then linked into the final host application. The problem with this
> -method is that only the tests in the object file containing the `main()`
> -function are linked into the final host application. This is because the other
> -tests are contained in their own object files within the static library and
> -they have no symbols in them that the final host application depends on, so
> -those object files are not linked into the final host application.
> -
> ### GoogleTest - A Simple Test Case
>
> Below is a sample test case from `SampleGoogleTestHost`.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111984): https://edk2.groups.io/g/devel/message/111984
Mute This Topic: https://groups.io/mt/102904624/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2023-12-01 17:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 22:42 [edk2-devel] [PATCH 0/2] UnitTestFrameworkPkg: Fix Google Test components with multiple files Pedro Falcato
2023-11-30 22:42 ` [edk2-devel] [PATCH 1/2] " Pedro Falcato
2023-12-01 17:07 ` Michael Kubacki
2023-12-01 20:50 ` Pedro Falcato
[not found] ` <179CD05BE5E43398.18076@groups.io>
2023-12-01 20:52 ` Pedro Falcato
2023-12-01 21:28 ` Michael D Kinney
2023-12-03 0:34 ` Michael D Kinney
2023-12-03 2:37 ` Michael D Kinney
2023-12-03 12:11 ` Pedro Falcato
2023-11-30 22:42 ` [edk2-devel] [PATCH 2/2] UnitTestFrameworkPkg/Readme.md: Remove the mention of the gtest main() limitation Pedro Falcato
2023-12-01 17:10 ` Michael Kubacki [this message]
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=730cdbbc-ef36-47ce-b0c7-19c6dd29d6e5@linux.microsoft.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