Branch: refs/heads/Bug_4389_UnitTestFrameworkPkg_AddGoogleMockSupport Home: https://github.com/tianocore/edk2 Commit: 3d39aa08126a0a9a0891a04941ff3d98c213b34d https://github.com/tianocore/edk2/commit/3d39aa08126a0a9a0891a04941ff3d98c213b34d Author: Chris Johnson <chris.n.john...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023)
Changed paths: M .gitmodules M ReadMe.rst A UnitTestFrameworkPkg/Include/Library/SubhookLib.h A UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.inf A UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.uni A UnitTestFrameworkPkg/Library/SubhookLib/subhook M UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTest.dsc M UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec M UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc Log Message: ----------- UnitTestFrameworkPkg: Add subhook submodule required for gmock 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 <af...@apple.com> Cc: Leif Lindholm <quic_llind...@quicinc.com> Cc: Michael D Kinney <michael.d.kin...@intel.com> Cc: Michael Kubacki <mikub...@linux.microsoft.com> Cc: Sean Brogan <sean.bro...@microsoft.com> Signed-off-by: Chris Johnson <chris.n.john...@intel.com> Commit: 424c595ed1f38201a86579c14d4595c9d846d9ce https://github.com/tianocore/edk2/commit/424c595ed1f38201a86579c14d4595c9d846d9ce Author: Chris Johnson <chris.n.john...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: M .pytool/CISettings.py Log Message: ----------- .pytool/CISettings.py: Add subhook submodule REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389 Add submodule for https://github.com/Zeex/subhook This submodule is required to hook internal functions when using gmock. Cc: Sean Brogan <sean.bro...@microsoft.com> Cc: Michael Kubacki <mikub...@linux.microsoft.com> Cc: Michael D Kinney <michael.d.kin...@intel.com> Cc: Liming Gao <gaolim...@byosoft.com.cn> Signed-off-by: Chris Johnson <chris.n.john...@intel.com> Commit: 7e0bf6b788711da4a6b7a2f7affec8fcc2acaa70 https://github.com/tianocore/edk2/commit/7e0bf6b788711da4a6b7a2f7affec8fcc2acaa70 Author: Chris Johnson <chris.n.john...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: A UnitTestFrameworkPkg/Include/Library/FunctionMockLib.h M UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h M UnitTestFrameworkPkg/Library/CmockaLib/CmockaLib.inf A UnitTestFrameworkPkg/Library/FunctionMockLib/FunctionMockLib.c A UnitTestFrameworkPkg/Library/FunctionMockLib/FunctionMockLib.inf A UnitTestFrameworkPkg/Library/FunctionMockLib/FunctionMockLib.uni M UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf M UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.uni M UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTest.dsc M UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec M UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc Log Message: ----------- UnitTestFrameworkPkg: Add gmock support to GoogleTestLib 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 <sean.bro...@microsoft.com> Cc: Michael Kubacki <mikub...@linux.microsoft.com> Cc: Michael D Kinney <michael.d.kin...@intel.com> Signed-off-by: Chris Johnson <chris.n.john...@intel.com> Commit: 9d0ced6b1a3dd7111f24a85e5c85e7247ddf5a3b https://github.com/tianocore/edk2/commit/9d0ced6b1a3dd7111f24a85e5c85e7247ddf5a3b Author: Chris Johnson <chris.n.john...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: M UnitTestFrameworkPkg/ReadMe.md Log Message: ----------- UnitTestFrameworkPkg/ReadMe.md: Add gmock documentation REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389 Cc: Sean Brogan <sean.bro...@microsoft.com> Cc: Michael Kubacki <mikub...@linux.microsoft.com> Cc: Michael D Kinney <michael.d.kin...@intel.com> Signed-off-by: Chris Johnson <chris.n.john...@intel.com> Commit: 851ddb356cffa471650e37c9b12767e81208f0cd https://github.com/tianocore/edk2/commit/851ddb356cffa471650e37c9b12767e81208f0cd Author: Chris Johnson <chris.n.john...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: M MdePkg/MdePkg.dec M MdePkg/Test/MdePkgHostTest.dsc A MdePkg/Test/Mock/Include/Library/GoogleTest/MockUefiLib.h A MdePkg/Test/Mock/Include/Library/GoogleTest/MockUefiRuntimeServicesTableLib.h A MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cpp A MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.inf A MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/MockUefiRuntimeServicesTableLib.cpp A MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/MockUefiRuntimeServicesTableLib.inf Log Message: ----------- MdePkg: Add gmock examples REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389 Cc: Michael D Kinney <michael.d.kin...@intel.com> Cc: Liming Gao <gaolim...@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang....@intel.com> Signed-off-by: Chris Johnson <chris.n.john...@intel.com> Commit: e174827d59df46e8d7af4a8a042df6bd611a06b9 https://github.com/tianocore/edk2/commit/e174827d59df46e8d7af4a8a042df6bd611a06b9 Author: Chris Johnson <chris.n.john...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: A MdeModulePkg/Library/UefiSortLib/GoogleTest/UefiSortLibGoogleTest.cpp A MdeModulePkg/Library/UefiSortLib/GoogleTest/UefiSortLibGoogleTest.inf M MdeModulePkg/Test/MdeModulePkgHostTest.dsc Log Message: ----------- MdeModulePkg/Library/UefiSortLib: Add GoogleTestLib example REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389 Cc: Jian J Wang <jian.j.w...@intel.com> Cc: Liming Gao <gaolim...@byosoft.com.cn> Signed-off-by: Chris Johnson <chris.n.john...@intel.com> Commit: 91eb59ccb72126e8150a43e9f53aace8de26dd6a https://github.com/tianocore/edk2/commit/91eb59ccb72126e8150a43e9f53aace8de26dd6a Author: Chris Johnson <chris.n.john...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: A SecurityPkg/Library/SecureBootVariableLib/GoogleTest/SecureBootVariableLibGoogleTest.cpp A SecurityPkg/Library/SecureBootVariableLib/GoogleTest/SecureBootVariableLibGoogleTest.inf M SecurityPkg/Library/SecureBootVariableLib/UnitTest/SecureBootVariableLibUnitTest.c M SecurityPkg/SecurityPkg.dec A SecurityPkg/Test/Mock/Include/Library/GoogleTest/MockPlatformPKProtectionLib.h A SecurityPkg/Test/Mock/Library/GoogleTest/MockPlatformPKProtectionLib/MockPlatformPKProtectionLib.cpp A SecurityPkg/Test/Mock/Library/GoogleTest/MockPlatformPKProtectionLib/MockPlatformPKProtectionLib.inf M SecurityPkg/Test/SecurityPkgHostTest.dsc Log Message: ----------- SecurityPkg: Add gmock example REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389 Cc: Jiewen Yao <jiewen....@intel.com> Cc: Jian J Wang <jian.j.w...@intel.com> Signed-off-by: Chris Johnson <chris.n.john...@intel.com> Commit: 1d534abec517c1733d680ccaaddbb153a1e8d4a9 https://github.com/tianocore/edk2/commit/1d534abec517c1733d680ccaaddbb153a1e8d4a9 Author: Michael D Kinney <michael.d.kin...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: M SecurityPkg/Library/SecureBootVariableLib/UnitTest/SecureBootVariableLibUnitTest.c Log Message: ----------- SecurityPkg/Library/SecureBootVariableLib: Fix VS20xx 4122 errors The unit test code for the SecureBootVariableLib is initializing local variable structures in their declaration from other local variables that are also initialized in their declaration. ANSI C does not allow this and error 4122 is generated on VS20xx compilers. The test cases are updated to initialize the local structure fields in C statements instead of their local variable declaration. Cc: Jiewen Yao <jiewen....@intel.com> Cc: Jian J Wang <jian.j.w...@intel.com> Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> Commit: f4af835a6d35bf5c3d9817633262e93c59d21e0d https://github.com/tianocore/edk2/commit/f4af835a6d35bf5c3d9817633262e93c59d21e0d Author: Michael D Kinney <michael.d.kin...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: M SecurityPkg/Library/SecureBootVariableLib/UnitTest/MockPlatformPKProtectionLib.inf M SecurityPkg/Library/SecureBootVariableLib/UnitTest/MockUefiLib.inf M SecurityPkg/Library/SecureBootVariableLib/UnitTest/MockUefiRuntimeServicesTableLib.inf Log Message: ----------- SecurityPkg/Library/SecureBootVariableLib: HOST_APPLICATION IA32/X64 only Cc: Jiewen Yao <jiewen....@intel.com> Cc: Jian J Wang <jian.j.w...@intel.com> Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> Commit: d50817c7af43e070fc5a166bd36a4741dbddcacb https://github.com/tianocore/edk2/commit/d50817c7af43e070fc5a166bd36a4741dbddcacb Author: Michael D Kinney <michael.d.kin...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: M MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf Log Message: ----------- MdePkg/Library/BaseLib: HOST_APPLICATION IA32/X64 only Cc: Liming Gao <gaolim...@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang....@intel.com> Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> Commit: 5fc57261d05fce9b2d023264ae19f1fd256b8791 https://github.com/tianocore/edk2/commit/5fc57261d05fce9b2d023264ae19f1fd256b8791 Author: Michael D Kinney <michael.d.kin...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: M MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf M MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.inf Log Message: ----------- MdeModulePkg: HOST_APPLICATION IA32/X64 only Cc: Jian J Wang <jian.j.w...@intel.com> Cc: Liming Gao <gaolim...@byosoft.com.cn> Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> Commit: 2a2d54a1bf823388a4ae0adf9fe649aed8abdfac https://github.com/tianocore/edk2/commit/2a2d54a1bf823388a4ae0adf9fe649aed8abdfac Author: Michael D Kinney <michael.d.kin...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: M PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLibUnitTestHost.inf M PrmPkg/Library/DxePrmModuleDiscoveryLib/UnitTest/DxePrmModuleDiscoveryLibUnitTestHost.inf Log Message: ----------- PrmPkg/Library: HOST_APPLICATION IA32/X64 only Cc: Michael Kubacki <mikub...@linux.microsoft.com> Cc: Nate DeSimone <nathaniel.l.desim...@intel.com> Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> Commit: dc35a058c06686f354c61f73abcaac16c00d29c1 https://github.com/tianocore/edk2/commit/dc35a058c06686f354c61f73abcaac16c00d29c1 Author: Michael D Kinney <michael.d.kin...@intel.com> Date: 2023-03-24 (Fri, 24 Mar 2023) Changed paths: M MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf A MdePkg/Test/Mock/Include/GoogleTest/MockUefiLib.h A MdePkg/Test/Mock/Include/GoogleTest/MockUefiRuntimeServicesTableLib.h R MdePkg/Test/Mock/Include/Library/GoogleTest/MockUefiLib.h R MdePkg/Test/Mock/Include/Library/GoogleTest/MockUefiRuntimeServicesTableLib.h M MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cpp M MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.inf M MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/MockUefiRuntimeServicesTableLib.cpp M MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/MockUefiRuntimeServicesTableLib.inf M SecurityPkg/Library/SecureBootVariableLib/GoogleTest/SecureBootVariableLibGoogleTest.cpp M SecurityPkg/Library/SecureBootVariableLib/UnitTest/MockPlatformPKProtectionLib.inf M SecurityPkg/Library/SecureBootVariableLib/UnitTest/MockUefiLib.inf M SecurityPkg/Library/SecureBootVariableLib/UnitTest/MockUefiRuntimeServicesTableLib.inf A SecurityPkg/Test/Mock/Include/GoogleTest/MockPlatformPKProtectionLib.h R SecurityPkg/Test/Mock/Include/Library/GoogleTest/MockPlatformPKProtectionLib.h M SecurityPkg/Test/Mock/Library/GoogleTest/MockPlatformPKProtectionLib/MockPlatformPKProtectionLib.cpp M SecurityPkg/Test/Mock/Library/GoogleTest/MockPlatformPKProtectionLib/MockPlatformPKProtectionLib.inf M UnitTestFrameworkPkg/Include/Library/FunctionMockLib.h Log Message: ----------- Misc EDK II CI fixes Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> Compare: https://github.com/tianocore/edk2/compare/3d39aa08126a%5E...dc35a058c066 _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits