<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/UnitTestFrameworkPkg/Library, branch trunk</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=trunk</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=trunk'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2024-06-04T03:43:08+00:00</updated>
<entry>
<title>Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305b</title>
<updated>2024-06-04T03:43:08+00:00</updated>
<author>
<name>kx</name>
<email>kx@radix.pro</email>
</author>
<published>2024-06-04T03:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7e2ccccace24636f29ddc210b94606abd4c7e42b'/>
<id>urn:sha1:7e2ccccace24636f29ddc210b94606abd4c7e42b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg/UnitTestDebugAssertLib: Add GoogleTest support</title>
<updated>2024-02-14T02:37:16+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2024-02-05T22:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2d144d7e147beddbba85cd04bd2093b544e5cf0a'/>
<id>urn:sha1:2d144d7e147beddbba85cd04bd2093b544e5cf0a</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683

Add an C++ implementation of UnitTestDebugAssert() API for
host-based environments. GoogleTest based environments throw
a C++ exception of type std::runtime_error when an ASSERT() is
triggered with a description that contains the filename, line
number, and the expression that triggered the ASSERT().

Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg/UnitTestLib: GetActiveFrameworkHandle() no ASSERT()</title>
<updated>2024-02-14T02:37:16+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2024-02-06T22:43:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=312ccaf81b6343c9bcee1f8992086075353abeca'/>
<id>urn:sha1:312ccaf81b6343c9bcee1f8992086075353abeca</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683

Update GetActiveFrameworkHandle() to remove ASSERT() and require
caller to check for NULL.

This allows GetActiveFrameworkHandle() to be used to determine if the
current host-based test environment is framework/cmocka or gtest. In
the framework/cmocka host-based environment GetActiveFrameworkHandle()
returns non-NULL. In the gtest host-based environment
GetActiveFrameworkHandle() returns NULL.

Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg: Expand host-based exception handling and gcov</title>
<updated>2024-02-14T02:37:16+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2024-02-03T01:28:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=81b69f306fe801546786186e1e5ae5f79a2fde97'/>
<id>urn:sha1:81b69f306fe801546786186e1e5ae5f79a2fde97</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683

Update MSFT CC_FLAGS for host-based unit tests to use /EHs
instead of /EHsc to support building C functions with SEH
(Structured Exception Handling) enabled.  This is required to
build UnitTestDebugAssertLibHost.inf.

Update GCC CC_FLAGS for host-based unit tests to use -fexceptions
to support catching exceptions.

Update GoogleTestLib.h to include Throws() APIs that enable
unit tests to use EXPECT_THAT() to check for expected ASSERT()
conditions for a specific ASSERT() expression.

Update GCC CC_FLAGS to add --coverage for host-based builds
for all GCC tool chains.

Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg: MSFT CC_FLAGS add /MT to for host builds</title>
<updated>2024-02-14T02:37:16+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2024-02-03T01:04:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=46c6de57b0628567ed3e72a7c65d1e6c708312cc'/>
<id>urn:sha1:46c6de57b0628567ed3e72a7c65d1e6c708312cc</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683

Add /MT to MSFT CC_FLAGS to always use release libraries
when building host-based unit tests so any exceptions
generated during host-based test execution generate an
error message in stderr instead of a popup window.

Use /MTd when -D UNIT_TESTING_DEBUG is to use debug
libraries when building host-based unit tests so any
exceptions generated during host-based test execution
generate a popup window with option to attach a debugger.

Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg: UnitTestPersistenceLib: Save Unit Test Cache Option</title>
<updated>2023-07-20T20:20:42+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin12@gmail.com</email>
</author>
<published>2023-03-17T18:01:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c6b512962e92ae54a895bdfd2147abaf2c9e3e22'/>
<id>urn:sha1:c6b512962e92ae54a895bdfd2147abaf2c9e3e22</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4467

Current implementation of UnitTestFrameworkPkg for shell-based unit test
will save the unit test cache to the same volume as the test application
itself. This works as long as the test application is on a writable
volume, such as USB or EFI partition.

Instead of saving the files to the same file system of unit test
application, this change will save the cache file to the path where the
user ran this test application.

This change then added an input argument to allow user to specify where
to save such cache file through `--CachePath` shell argument to allow
even more flexibility.

This change was tested on proprietary physical hardware platforms and
QEMU based virtual platform.

Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;

Signed-off-by: Kun Qin &lt;kuqin12@gmail.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg: Add UnitTestPeiServicesTablePointerLib</title>
<updated>2023-06-13T02:53:40+00:00</updated>
<author>
<name>Zhiguang Liu</name>
<email>zhiguang.liu@intel.com</email>
</author>
<published>2023-05-26T05:51:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=530f5b0912c1c3837337baeec66eb7b0a90d9969'/>
<id>urn:sha1:530f5b0912c1c3837337baeec66eb7b0a90d9969</id>
<content type='text'>
This library supports a PeiServicesTablePointerLib implementation
that allows code dependent upon PeiServicesTable to operate in an
isolated execution environment such as within the context of a
host-based unit test framework.

The unit test should initialize the PeiServicesTable database with
any required elements (e.g. PPIs, Hob etc.) prior to the services
being invoked by code under test.

It is strongly recommended to clean any global databases by using
EFI_PEI_SERVICES.ResetSystem2 after every unit test so the tests
execute in a predictable manner from a clean state.

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Signed-off-by: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg: Update to be more C11 compliant by using __func__</title>
<updated>2023-04-10T14:19:57+00:00</updated>
<author>
<name>Rebecca Cran</name>
<email>rebecca@bsdio.com</email>
</author>
<published>2023-04-06T19:51:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1295e37d4bb4c07f41cfa6ce298344aaf1563c72'/>
<id>urn:sha1:1295e37d4bb4c07f41cfa6ce298344aaf1563c72</id>
<content type='text'>
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.

Since it's more standard, replace __FUNCTION__ with __func__ throughout
UnitTestFrameworkPkg.

Signed-off-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg:  Add gmock support to GoogleTestLib</title>
<updated>2023-04-10T05:59:02+00:00</updated>
<author>
<name>Chris Johnson</name>
<email>chris.n.johnson@intel.com</email>
</author>
<published>2023-03-24T23:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d0252b8fc1fe8b6489a4d0a25c29a5d3eaa95228'/>
<id>urn:sha1:d0252b8fc1fe8b6489a4d0a25c29a5d3eaa95228</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389

* Add gmock support to GoogleTestLib
* Add FunctionMockLib library class and library instance
* Add GoogleTest extension to GoogleTestLib.h for CHAR16 type
* Add GoogleTest extension to GoogleTestLib.h for buffer types
* HOST_APPLICATION only supports IA32/X64

Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Chris Johnson &lt;chris.n.johnson@intel.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Oliver Smith-Denny &lt;osde@linux.microsoft.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg: Add subhook submodule required for gmock</title>
<updated>2023-04-10T05:59:02+00:00</updated>
<author>
<name>Chris Johnson</name>
<email>chris.n.johnson@intel.com</email>
</author>
<published>2022-12-21T19:56:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0c6d851d258bac2df1e21e2670e8baca1bb37771'/>
<id>urn:sha1:0c6d851d258bac2df1e21e2670e8baca1bb37771</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389

Add subhook submodule that is required to hook internal functions
when using gmock.

    https://github.com/Zeex/subhook

Add SubhookLib library class and SubhookLib library instance.
Include the SUBHOOK_STATIC define in the SubhookLib INF file so
it builds as a static library. Also include the SUBHOOK_STATIC
define in SubhookLib.h so all modules using SubhookLib properly
link SubhookLib as a static library.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Signed-off-by: Chris Johnson &lt;chris.n.johnson@intel.com&gt;
Reviewed-by: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Oliver Smith-Denny &lt;osde@linux.microsoft.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
</feed>
