summaryrefslogtreecommitdiffstats
path: root/UnitTestFrameworkPkg/Library
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2022-06-20 19:52:03 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-11-11 05:46:51 +0000
commitcef0c5c68427f4e93dc9c4135a8e60018f2307b5 (patch)
tree1496519ff0b99e3bbeeada5a6e606c651c04ef95 /UnitTestFrameworkPkg/Library
parentc1b073a9dccc11fbd9fdfd69f76de6e972ad1550 (diff)
downloadedk2-cef0c5c68427f4e93dc9c4135a8e60018f2307b5.tar.gz
edk2-cef0c5c68427f4e93dc9c4135a8e60018f2307b5.tar.bz2
edk2-cef0c5c68427f4e93dc9c4135a8e60018f2307b5.zip
UnitTestFrameworkPkg: Add googletest submodule and GoogleTestLib
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4134 Add submodule for googletest and add GoogleTestLib that is required for GoogleTest based unit tests. Add GoogleTest documentation to Readme.md along with a port of the sample unit test to the GoogleTest style. A few typos in Readme.md are also fixed. Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com> Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
Diffstat (limited to 'UnitTestFrameworkPkg/Library')
-rw-r--r--UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf36
-rw-r--r--UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.uni14
m---------UnitTestFrameworkPkg/Library/GoogleTestLib/googletest0
3 files changed, 50 insertions, 0 deletions
diff --git a/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf b/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf
new file mode 100644
index 0000000000..68db75d702
--- /dev/null
+++ b/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.inf
@@ -0,0 +1,36 @@
+## @file
+# This module provides GoogleTest Library implementation.
+#
+# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = GoogleTestLib
+ MODULE_UNI_FILE = GoogleTestLib.uni
+ FILE_GUID = A90E4751-AD30-43CC-980B-01E356B49ADF
+ MODULE_TYPE = BASE
+ VERSION_STRING = 0.1
+ LIBRARY_CLASS = GoogleTestLib|HOST_APPLICATION
+
+#
+# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64
+#
+
+[Sources]
+ googletest/googletest/src/gtest-all.cc
+
+[Packages]
+ UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
+
+[BuildOptions]
+ MSFT:*_*_*_CC_FLAGS == /c /EHsc /Zi
+ MSFT:NOOPT_*_*_CC_FLAGS = /Od
+
+ GCC:*_*_*_CC_FLAGS == -g -c
+
+ GCC:NOOPT_*_*_CC_FLAGS = -O0
+ GCC:*_*_IA32_CC_FLAGS = -m32
+ GCC:*_*_X64_CC_FLAGS = -m64
diff --git a/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.uni b/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.uni
new file mode 100644
index 0000000000..14c862a237
--- /dev/null
+++ b/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib.uni
@@ -0,0 +1,14 @@
+// /** @file
+// This module provides GoogleTest Library implementation.
+//
+// This module provides GoogleTest 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 "GoogleTest Library implementation"
+
+#string STR_MODULE_DESCRIPTION #language en-US "This module provides GoogleTest Library implementation."
diff --git a/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest b/UnitTestFrameworkPkg/Library/GoogleTestLib/googletest
new file mode 160000
+Subproject 86add13493e5c881d7e4ba77fb91c1f57752b3a