summaryrefslogtreecommitdiffstats
path: root/UnitTestFrameworkPkg
diff options
context:
space:
mode:
Diffstat (limited to 'UnitTestFrameworkPkg')
-rw-r--r--UnitTestFrameworkPkg/Include/Library/SubhookLib.h15
-rw-r--r--UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.inf31
-rw-r--r--UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.uni11
m---------UnitTestFrameworkPkg/Library/SubhookLib/subhook0
-rw-r--r--UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTest.dsc1
-rw-r--r--UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec2
-rw-r--r--UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc1
7 files changed, 61 insertions, 0 deletions
diff --git a/UnitTestFrameworkPkg/Include/Library/SubhookLib.h b/UnitTestFrameworkPkg/Include/Library/SubhookLib.h
new file mode 100644
index 0000000000..46783adfcc
--- /dev/null
+++ b/UnitTestFrameworkPkg/Include/Library/SubhookLib.h
@@ -0,0 +1,15 @@
+/** @file
+ SubhookLib class with APIs from the subhook project
+
+ Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef SUBHOOK_LIB_H_
+#define SUBHOOK_LIB_H_
+
+#define SUBHOOK_STATIC
+#include <subhook.h>
+
+#endif
diff --git a/UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.inf b/UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.inf
new file mode 100644
index 0000000000..a67be890d8
--- /dev/null
+++ b/UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.inf
@@ -0,0 +1,31 @@
+## @file
+# This module provides Subhook Library implementation.
+#
+# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010018
+ BASE_NAME = SubhookLib
+ MODULE_UNI_FILE = SubhookLib.uni
+ FILE_GUID = 70E03378-E140-46A8-8E65-7719DA14A240
+ MODULE_TYPE = HOST_APPLICATION
+ VERSION_STRING = 0.1
+ LIBRARY_CLASS = SubhookLib
+
+#
+# VALID_ARCHITECTURES = IA32 X64
+#
+
+[Sources]
+ subhook/subhook.c
+
+[Packages]
+ UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
+
+[BuildOptions]
+ MSFT:*_*_*_CC_FLAGS == /c /EHsc /Zi /DSUBHOOK_STATIC /Od
+ GCC:*_*_IA32_CC_FLAGS == -g -c -O0 -m32
+ GCC:*_*_X64_CC_FLAGS == -g -c -O0 -m64
diff --git a/UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.uni b/UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.uni
new file mode 100644
index 0000000000..eb61f03404
--- /dev/null
+++ b/UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.uni
@@ -0,0 +1,11 @@
+// /** @file
+// This module provides Subhook Library implementation.
+//
+// Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+// **/
+
+#string STR_MODULE_ABSTRACT #language en-US "Subhook Library implementation"
+
+#string STR_MODULE_DESCRIPTION #language en-US "This module provides Subhook Library implementation."
diff --git a/UnitTestFrameworkPkg/Library/SubhookLib/subhook b/UnitTestFrameworkPkg/Library/SubhookLib/subhook
new file mode 160000
+Subproject 83d4e1ebef3588fae48b69a7352cc21801cb70b
diff --git a/UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTest.dsc b/UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTest.dsc
index 708ef7f9ab..722509c8f2 100644
--- a/UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTest.dsc
+++ b/UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTest.dsc
@@ -33,6 +33,7 @@
#
UnitTestFrameworkPkg/Library/CmockaLib/CmockaLib.inf
UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf
+ UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.inf
UnitTestFrameworkPkg/Library/Posix/DebugLibPosix/DebugLibPosix.inf
UnitTestFrameworkPkg/Library/Posix/MemoryAllocationLibPosix/MemoryAllocationLibPosix.inf
UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLibCmocka.inf
diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
index 14e387d63a..30b489915d 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
@@ -20,6 +20,7 @@
Library/CmockaLib/cmocka/include
Library/GoogleTestLib/googletest/googletest/include
Library/GoogleTestLib/googletest/googlemock/include
+ Library/SubhookLib/subhook
[Includes.Common.Private]
PrivateInclude
@@ -34,6 +35,7 @@
## @libraryclass GoogleTest infrastructure
#
GoogleTestLib|Include/Library/GoogleTestLib.h
+ SubhookLib|Include/Library/SubhookLib.h
[LibraryClasses.Common.Private]
## @libraryclass Provides a unit test result report
diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
index 7f5dfa30ed..e77897bd32 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
@@ -15,6 +15,7 @@
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLibNull/BaseCacheMaintenanceLibNull.inf
CmockaLib|UnitTestFrameworkPkg/Library/CmockaLib/CmockaLib.inf
GoogleTestLib|UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf
+ SubhookLib|UnitTestFrameworkPkg/Library/SubhookLib/SubhookLib.inf
UnitTestLib|UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLibCmocka.inf
DebugLib|UnitTestFrameworkPkg/Library/Posix/DebugLibPosix/DebugLibPosix.inf
MemoryAllocationLib|UnitTestFrameworkPkg/Library/Posix/MemoryAllocationLibPosix/MemoryAllocationLibPosix.inf