[edk2-devel] [PATCH 2/4] [staging/HBFA PATCH]: CmockaHostUnitTestPkg: Enable CmockaHostUnitTestPkg build.

Sun, Tengfen tengfen.sun at intel.com
Wed May 22 07:20:42 UTC 2019


Enable build for CmockaHostUnitTestPkg with cmocka submodule.
REF: https://edk2.groups.io/g/devel/message/39893

Signed-off-by: Tengfen Sun <tengfen.sun at intel.com>
---
 .../CmockaHostUnitTestPkg.dec                 | 16 +++++++++
 .../CmockaHostUnitTestPkg.dsc                 | 22 +++++++++++++
 .../Library/CmockaLib/CmockaLib.inf           | 33 +++++++++++++++++++
 .../Library/CmockaLib/CmockaLib.uni           | 16 +++++++++
 4 files changed, 87 insertions(+)
 create mode 100644 HBFA/CmockaHostUnitTestPkg/CmockaHostUnitTestPkg.dec
 create mode 100644 HBFA/CmockaHostUnitTestPkg/CmockaHostUnitTestPkg.dsc
 create mode 100644 HBFA/CmockaHostUnitTestPkg/Library/CmockaLib/CmockaLib.inf
 create mode 100644 HBFA/CmockaHostUnitTestPkg/Library/CmockaLib/CmockaLib.uni

diff --git a/HBFA/CmockaHostUnitTestPkg/CmockaHostUnitTestPkg.dec b/HBFA/CmockaHostUnitTestPkg/CmockaHostUnitTestPkg.dec
new file mode 100644
index 000000000000..85b41b1165d4
--- /dev/null
+++ b/HBFA/CmockaHostUnitTestPkg/CmockaHostUnitTestPkg.dec
@@ -0,0 +1,16 @@
+## @file  CmockaHostUnitTestPkg.dec
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  DEC_SPECIFICATION              = 0x00010005
+  PACKAGE_NAME                   = CmockaHostUnitTestPkg
+  PACKAGE_GUID                   = 09566709-F1CA-4365-BB99-FC7869BE4E1C
+  PACKAGE_VERSION                = 0.1
+
+[Includes]
+  Library/CmockaLib/cmocka/include
+  Library/CmockaLib/cmocka/include/cmockery
\ No newline at end of file
diff --git a/HBFA/CmockaHostUnitTestPkg/CmockaHostUnitTestPkg.dsc b/HBFA/CmockaHostUnitTestPkg/CmockaHostUnitTestPkg.dsc
new file mode 100644
index 000000000000..27868fc5e050
--- /dev/null
+++ b/HBFA/CmockaHostUnitTestPkg/CmockaHostUnitTestPkg.dsc
@@ -0,0 +1,22 @@
+## @file CmockaHostUnitTestPkg.dsc
+# 
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  PLATFORM_NAME                  = CmockaHostUnitTestPkg
+  PLATFORM_GUID                  = AD571B20-0E74-4513-AE17-E557079A9756
+  PLATFORM_VERSION               = 0.1
+  DSC_SPECIFICATION              = 0x00010005
+  OUTPUT_DIRECTORY               = Build/CmockaHostUnitTestPkg
+  SUPPORTED_ARCHITECTURES        = IA32|X64
+  BUILD_TARGETS                  = DEBUG|RELEASE
+  SKUID_IDENTIFIER               = DEFAULT
+
+[LibraryClasses]
+  CmockaLib|CmockaHostUnitTestPkg/Library/CmockaLib/CmockaLib.inf
+
+[Components]
+  CmockaHostUnitTestPkg/Library/CmockaLib/CmockaLib.inf
\ No newline at end of file
diff --git a/HBFA/CmockaHostUnitTestPkg/Library/CmockaLib/CmockaLib.inf b/HBFA/CmockaHostUnitTestPkg/Library/CmockaLib/CmockaLib.inf
new file mode 100644
index 000000000000..dc9f48347625
--- /dev/null
+++ b/HBFA/CmockaHostUnitTestPkg/Library/CmockaLib/CmockaLib.inf
@@ -0,0 +1,33 @@
+## @file
+#  This module provides Cmocka Library implementation.
+#
+#  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = CmockaLib
+  MODULE_UNI_FILE                = CmockaLib.uni
+  FILE_GUID                      = F1662152-3399-49AC-BE44-CAA97575FACE
+  MODULE_TYPE                    = BASE
+  VERSION_STRING                 = 0.1
+  LIBRARY_CLASS                  = CmockaLib
+  DEFINE CMOCKA_PATH             = cmocka
+
+#
+#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64
+#
+
+[Sources]
+  $(CMOCKA_PATH)/src/cmocka.c
+  
+[Packages]
+  CmockaHostUnitTestPkg/CmockaHostUnitTestPkg.dec
+  
+[BuildOptions]
+  MSFT:*_*_*_CC_FLAGS      ==  /c /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1 /D _CRT_NONSTDC_NO_WARNINGS=1 /D _CRT_SECURE_NO_WARNINGS=1 -DHAVE_VSNPRINTF -DHAVE_SNPRINTF
+
+  GCC:*_*_IA32_CC_FLAGS    == -m32 -O0 -g -fprofile-arcs -ftest-coverage -std=gnu99 -Wpedantic -Wall -Wshadow -Wmissing-prototypes -Wcast-align -Werror=address -Wstrict-prototypes -Werror=strict-prototypes -Wwrite-strings -Werror=write-strings -Werror-implicit-function-declaration -Wpointer-arith -Werror=pointer-arith -Wdeclaration-after-statement -Werror=declaration-after-statement -Wreturn-type -Werror=return-type -Wuninitialized -Werror=uninitialized -Werror=strict-overflow -Wstrict-overflow=2 -Wno-format-zero-length -Wmissing-field-initializers -Wformat-security -Werror=format-security -fno-common -Wformat -fno-common -fstack-protector-strong -DHAVE_SIGNAL_H
+  GCC:*_*_X64_CC_FLAGS     == -m64 -O0 -g -fprofile-arcs -ftest-coverage -std=gnu99 -Wpedantic -Wall -Wshadow -Wmissing-prototypes -Wcast-align -Werror=address -Wstrict-prototypes -Werror=strict-prototypes -Wwrite-strings -Werror=write-strings -Werror-implicit-function-declaration -Wpointer-arith -Werror=pointer-arith -Wdeclaration-after-statement -Werror=declaration-after-statement -Wreturn-type -Werror=return-type -Wuninitialized -Werror=uninitialized -Werror=strict-overflow -Wstrict-overflow=2 -Wno-format-zero-length -Wmissing-field-initializers -Wformat-security -Werror=format-security -fno-common -Wformat -fno-common -fstack-protector-strong -DHAVE_SIGNAL_H
diff --git a/HBFA/CmockaHostUnitTestPkg/Library/CmockaLib/CmockaLib.uni b/HBFA/CmockaHostUnitTestPkg/Library/CmockaLib/CmockaLib.uni
new file mode 100644
index 000000000000..5a114b934554
--- /dev/null
+++ b/HBFA/CmockaHostUnitTestPkg/Library/CmockaLib/CmockaLib.uni
@@ -0,0 +1,16 @@
+// /** @file
+// This module provides Cmocka Library implementation.
+//
+// This module provides Cmocka Library implementation.
+//
+// Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+// **/
+
+
+#string STR_MODULE_ABSTRACT             #language en-US "Cmocka Library implementation"
+
+#string STR_MODULE_DESCRIPTION          #language en-US "This module provides Cmocka Library implementation."
+
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#41197): https://edk2.groups.io/g/devel/message/41197
Mute This Topic: https://groups.io/mt/31717508/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list