Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: ded41a64bd5c6bc40283bf5bd07b18bae5cbcd09
https://github.com/tianocore/edk2/commit/ded41a64bd5c6bc40283bf5bd07b18bae5cbcd09
Author: Michael D Kinney <[email protected]>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
M MdePkg/Include/Library/DebugLib.h
Log Message:
-----------
MdePkg/Include: Rename _DEBUG() to address name collision
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683
When VS20xx host-based unit tests are built with debug
libraries a name collision occurs with the DebugLib.h
internal macro _DEBUG(). Rename this internal macro
to _DEBUGLIB_DEBUG() to address the name collision.
Cc: Liming Gao <[email protected]>
Cc: Zhiguang Liu <[email protected]>
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Leif Lindholm <[email protected]>
Commit: 46c6de57b0628567ed3e72a7c65d1e6c708312cc
https://github.com/tianocore/edk2/commit/46c6de57b0628567ed3e72a7c65d1e6c708312cc
Author: Michael D Kinney <[email protected]>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
M UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf
M UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
Log Message:
-----------
UnitTestFrameworkPkg: MSFT CC_FLAGS add /MT to for host builds
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 <[email protected]>
Cc: Sean Brogan <[email protected]>
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Michael Kubacki <[email protected]>
Commit: 81b69f306fe801546786186e1e5ae5f79a2fde97
https://github.com/tianocore/edk2/commit/81b69f306fe801546786186e1e5ae5f79a2fde97
Author: Michael D Kinney <[email protected]>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
M UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h
M UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf
M UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
M UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
Log Message:
-----------
UnitTestFrameworkPkg: Expand host-based exception handling and gcov
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 <[email protected]>
Cc: Sean Brogan <[email protected]>
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Michael Kubacki <[email protected]>
Commit: 312ccaf81b6343c9bcee1f8992086075353abeca
https://github.com/tianocore/edk2/commit/312ccaf81b6343c9bcee1f8992086075353abeca
Author: Michael D Kinney <[email protected]>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
M UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c
M UnitTestFrameworkPkg/Library/UnitTestLib/Log.c
M UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c
M UnitTestFrameworkPkg/Library/UnitTestLib/RunTestsCmocka.c
M UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c
Log Message:
-----------
UnitTestFrameworkPkg/UnitTestLib: GetActiveFrameworkHandle() no ASSERT()
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 <[email protected]>
Cc: Sean Brogan <[email protected]>
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Michael Kubacki <[email protected]>
Commit: 2d144d7e147beddbba85cd04bd2093b544e5cf0a
https://github.com/tianocore/edk2/commit/2d144d7e147beddbba85cd04bd2093b544e5cf0a
Author: Michael D Kinney <[email protected]>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
A
UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLibHost.cpp
A
UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLibHost.inf
A
UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLibHost.uni
M UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTest.dsc
M UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
M UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
Log Message:
-----------
UnitTestFrameworkPkg/UnitTestDebugAssertLib: Add GoogleTest support
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 <[email protected]>
Cc: Sean Brogan <[email protected]>
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Michael Kubacki <[email protected]>
Commit: 0a989069df1f00f9ca1b6968c91c5c9bc01a0198
https://github.com/tianocore/edk2/commit/0a989069df1f00f9ca1b6968c91c5c9bc01a0198
Author: Michael D Kinney <[email protected]>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
M UnitTestFrameworkPkg/ReadMe.md
M
UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTest/SampleGoogleTest.cpp
Log Message:
-----------
UnitTestFrameworkPkg/SampleGoogleTest: Use EXPECT_ANY_THROW()
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683
Update GoogleTest samples to use EXPECT_ANY_THROW() instead
of ASSERT_DEATH(). ASSERT_DEATH() is a very slow method to
detect an expected ASSERT() condition. Throwing an exception
from ASSERT() and using EXPECT_ANY_THROW() is several orders
of magnitude faster.
Update GoogleTest sample with example of using EXPECT_THROW()
and EXPECT_THAT() to check for more specific ASSERT() conditions
that allow unit test cases to test functions that contain
more than one ASSERT() statement and verify that the expected
ASSERT() is the one that was actually triggered.
Update library mappings so target-based unit tests use
UnitTestDebugAssertLib.inf and host-based unit tests use
UnitTestDebugAssertLibHost.inf
Cc: Michael Kubacki <[email protected]>
Cc: Sean Brogan <[email protected]>
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Michael Kubacki <[email protected]>
Commit: a1c426e8440b55ee12d92cefa7114fd6f7b599cb
https://github.com/tianocore/edk2/commit/a1c426e8440b55ee12d92cefa7114fd6f7b599cb
Author: Michael D Kinney <[email protected]>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
A
UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTestExpectFail/SampleGoogleTestExpectFail.cpp
A
UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTestExpectFail/SampleGoogleTestHostExpectFail.inf
A
UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTestGenerateException/SampleGoogleTestGenerateException.cpp
A
UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTestGenerateException/SampleGoogleTestHostGenerateException.inf
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestDxeExpectFail.inf
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestExpectFail.c
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestHostExpectFail.inf
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestPeiExpectFail.inf
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestSmmExpectFail.inf
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestUefiShellExpectFail.inf
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestDxeGenerateException.inf
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestGenerateException.c
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestHostGenerateException.inf
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestPeiGenerateException.inf
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestSmmGenerateException.inf
A
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestUefiShellGenerateException.inf
A UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTestExpectFail.dsc
M UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
M UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc
Log Message:
-----------
UnitTestFrameworkPkg: Add DSC and host tests that always fail
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683
Add sample unit tests that always fail or generate unexpected
exceptions along with a new DSC file to build the unit tests
that always fail or generate unexpected exceptions. This can
be used to verify the log information on failures is accurate
and provides the correct information to determine the source
of the unit test failure.
Divide by zero is used to generate unexpected exceptions. The
compiler warnings for divide by zero are disables for the unit
tests that generate divide by zero exceptions on purpose.
These tests are not added to CI because CI would always fail.
The UnitTestFrameworkPkg.ci.yaml file is updated to ignore the
INF files for host-based testing that always fail.
Cc: Michael Kubacki <[email protected]>
Cc: Sean Brogan <[email protected]>
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Michael Kubacki <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/8801c75b4d77...a1c426e8440b
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits