summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Test
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2024-06-04 06:43:08 +0300
committerkx <kx@radix.pro>2024-06-04 06:43:08 +0300
commit7e2ccccace24636f29ddc210b94606abd4c7e42b (patch)
tree545d43ea12671048956cafeb12303e84d601e571 /MdeModulePkg/Test
parent27b044605cd5f6b33a3d231576003850b3fe305b (diff)
downloadedk2-trunk.tar.xz
Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305btrunk
Diffstat (limited to 'MdeModulePkg/Test')
-rw-r--r--MdeModulePkg/Test/MdeModulePkgHostTest.dsc132
-rw-r--r--MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h80
-rw-r--r--MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.cpp28
-rw-r--r--MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.inf70
4 files changed, 155 insertions, 155 deletions
diff --git a/MdeModulePkg/Test/MdeModulePkgHostTest.dsc b/MdeModulePkg/Test/MdeModulePkgHostTest.dsc
index 198cdd814f..7be2185683 100644
--- a/MdeModulePkg/Test/MdeModulePkgHostTest.dsc
+++ b/MdeModulePkg/Test/MdeModulePkgHostTest.dsc
@@ -1,66 +1,66 @@
-## @file
-# MdeModulePkg DSC file used to build host-based unit tests.
-#
-# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>
-# Copyright (C) Microsoft Corporation.
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-[Defines]
- PLATFORM_NAME = MdeModulePkgHostTest
- PLATFORM_GUID = F74AF7C6-698C-4EBA-BA49-FF6816916354
- PLATFORM_VERSION = 0.1
- DSC_SPECIFICATION = 0x00010005
- OUTPUT_DIRECTORY = Build/MdeModulePkg/HostTest
- SUPPORTED_ARCHITECTURES = IA32|X64
- BUILD_TARGETS = NOOPT
- SKUID_IDENTIFIER = DEFAULT
-
-!include UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
-
-[LibraryClasses]
- SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
-
-[Components]
- MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf
-
- #
- # Build MdeModulePkg HOST_APPLICATION Tests
- #
- MdeModulePkg/Library/DxeResetSystemLib/UnitTest/DxeResetSystemLibUnitTestHost.inf {
- <LibraryClasses>
- ResetSystemLib|MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.inf
- UefiRuntimeServicesTableLib|MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf
- }
-
- MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.inf {
- <LibraryClasses>
- VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
- VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
- <PcdsFixedAtBuild>
- gEfiMdeModulePkgTokenSpaceGuid.PcdAllowVariablePolicyEnforcementDisable|TRUE
- }
-
- MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.inf {
- <LibraryClasses>
- UefiSortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- }
-
- MdeModulePkg/Library/UefiSortLib/GoogleTest/UefiSortLibGoogleTest.inf {
- <LibraryClasses>
- UefiSortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- }
-
- MdeModulePkg/Library/ImagePropertiesRecordLib/UnitTest/ImagePropertiesRecordLibUnitTestHost.inf {
- <LibraryClasses>
- ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
- PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
- }
-
- #
- # Build HOST_APPLICATION Libraries
- #
- MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.inf
+## @file
+# MdeModulePkg DSC file used to build host-based unit tests.
+#
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (C) Microsoft Corporation.
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ PLATFORM_NAME = MdeModulePkgHostTest
+ PLATFORM_GUID = F74AF7C6-698C-4EBA-BA49-FF6816916354
+ PLATFORM_VERSION = 0.1
+ DSC_SPECIFICATION = 0x00010005
+ OUTPUT_DIRECTORY = Build/MdeModulePkg/HostTest
+ SUPPORTED_ARCHITECTURES = IA32|X64
+ BUILD_TARGETS = NOOPT
+ SKUID_IDENTIFIER = DEFAULT
+
+!include UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
+
+[LibraryClasses]
+ SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
+
+[Components]
+ MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf
+
+ #
+ # Build MdeModulePkg HOST_APPLICATION Tests
+ #
+ MdeModulePkg/Library/DxeResetSystemLib/UnitTest/DxeResetSystemLibUnitTestHost.inf {
+ <LibraryClasses>
+ ResetSystemLib|MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.inf
+ UefiRuntimeServicesTableLib|MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf
+ }
+
+ MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.inf {
+ <LibraryClasses>
+ VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
+ VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
+ <PcdsFixedAtBuild>
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAllowVariablePolicyEnforcementDisable|TRUE
+ }
+
+ MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.inf {
+ <LibraryClasses>
+ UefiSortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
+ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+ }
+
+ MdeModulePkg/Library/UefiSortLib/GoogleTest/UefiSortLibGoogleTest.inf {
+ <LibraryClasses>
+ UefiSortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
+ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+ }
+
+ MdeModulePkg/Library/ImagePropertiesRecordLib/UnitTest/ImagePropertiesRecordLibUnitTestHost.inf {
+ <LibraryClasses>
+ ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
+ PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+ }
+
+ #
+ # Build HOST_APPLICATION Libraries
+ #
+ MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.inf
diff --git a/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h b/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h
index 51eefa6c21..49cfdc9bf5 100644
--- a/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h
+++ b/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h
@@ -1,40 +1,40 @@
-/** @file
- Google Test mocks for PciHostBridgeLib
-
- Copyright (c) 2023, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#ifndef MOCK_PCI_HOST_BRIDGE_LIB_H_
-#define MOCK_PCI_HOST_BRIDGE_LIB_H_
-
-#include <Library/GoogleTestLib.h>
-#include <Library/FunctionMockLib.h>
-extern "C" {
- #include <Uefi.h>
- #include <Library/PciHostBridgeLib.h>
-}
-
-struct MockPciHostBridgeLib {
- MOCK_INTERFACE_DECLARATION (MockPciHostBridgeLib);
-
- MOCK_FUNCTION_DECLARATION (
- PCI_ROOT_BRIDGE *,
- PciHostBridgeGetRootBridges,
- (UINTN *Count)
- );
- MOCK_FUNCTION_DECLARATION (
- VOID,
- PciHostBridgeFreeRootBridges,
- (PCI_ROOT_BRIDGE *Bridges,
- UINTN Count)
- );
- MOCK_FUNCTION_DECLARATION (
- VOID,
- PciHostBridgeResourceConflict,
- (EFI_HANDLE HostBridgeHandle,
- VOID *Configuration)
- );
-};
-
-#endif
+/** @file
+ Google Test mocks for PciHostBridgeLib
+
+ Copyright (c) 2023, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef MOCK_PCI_HOST_BRIDGE_LIB_H_
+#define MOCK_PCI_HOST_BRIDGE_LIB_H_
+
+#include <Library/GoogleTestLib.h>
+#include <Library/FunctionMockLib.h>
+extern "C" {
+ #include <Uefi.h>
+ #include <Library/PciHostBridgeLib.h>
+}
+
+struct MockPciHostBridgeLib {
+ MOCK_INTERFACE_DECLARATION (MockPciHostBridgeLib);
+
+ MOCK_FUNCTION_DECLARATION (
+ PCI_ROOT_BRIDGE *,
+ PciHostBridgeGetRootBridges,
+ (UINTN *Count)
+ );
+ MOCK_FUNCTION_DECLARATION (
+ VOID,
+ PciHostBridgeFreeRootBridges,
+ (PCI_ROOT_BRIDGE *Bridges,
+ UINTN Count)
+ );
+ MOCK_FUNCTION_DECLARATION (
+ VOID,
+ PciHostBridgeResourceConflict,
+ (EFI_HANDLE HostBridgeHandle,
+ VOID *Configuration)
+ );
+};
+
+#endif
diff --git a/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.cpp b/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.cpp
index 1891727d3b..f244e03394 100644
--- a/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.cpp
+++ b/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.cpp
@@ -1,14 +1,14 @@
-/** @file
- Mock instance of the PCI Host Bridge Library.
-
- Copyright (c) 2023, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#include <GoogleTest/Library/MockPciHostBridgeLib.h>
-
-MOCK_INTERFACE_DEFINITION (MockPciHostBridgeLib);
-
-MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeGetRootBridges, 1, EFIAPI);
-MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeFreeRootBridges, 2, EFIAPI);
-MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeResourceConflict, 2, EFIAPI);
+/** @file
+ Mock instance of the PCI Host Bridge Library.
+
+ Copyright (c) 2023, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#include <GoogleTest/Library/MockPciHostBridgeLib.h>
+
+MOCK_INTERFACE_DEFINITION (MockPciHostBridgeLib);
+
+MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeGetRootBridges, 1, EFIAPI);
+MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeFreeRootBridges, 2, EFIAPI);
+MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeResourceConflict, 2, EFIAPI);
diff --git a/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.inf b/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.inf
index 89daefb9f0..423794e4d1 100644
--- a/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.inf
+++ b/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHostBridgeLib.inf
@@ -1,35 +1,35 @@
-## @file
-# Mock instance of the PCI Host Bridge Library.
-#
-# Copyright (c) 2023, Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = MockPciHostBridgeLib
- FILE_GUID = B51721FE-0BBA-4611-B9A5-ED13C49AC060
- MODULE_TYPE = HOST_APPLICATION
- VERSION_STRING = 1.0
- LIBRARY_CLASS = PciHostBridgeLib
-
-#
-# The following information is for reference only and not required by the build
-# tools.
-#
-# VALID_ARCHITECTURES = IA32 X64
-#
-
-[Sources]
- MockPciHostBridgeLib.cpp
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
- UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
-
-[LibraryClasses]
- GoogleTestLib
-
-[BuildOptions]
- MSFT:*_*_*_CC_FLAGS = /EHsc
+## @file
+# Mock instance of the PCI Host Bridge Library.
+#
+# Copyright (c) 2023, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = MockPciHostBridgeLib
+ FILE_GUID = B51721FE-0BBA-4611-B9A5-ED13C49AC060
+ MODULE_TYPE = HOST_APPLICATION
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = PciHostBridgeLib
+
+#
+# The following information is for reference only and not required by the build
+# tools.
+#
+# VALID_ARCHITECTURES = IA32 X64
+#
+
+[Sources]
+ MockPciHostBridgeLib.cpp
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
+
+[LibraryClasses]
+ GoogleTestLib
+
+[BuildOptions]
+ MSFT:*_*_*_CC_FLAGS = /EHsc