public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sun, Tengfen" <tengfen.sun@intel.com>
To: devel@edk2.groups.io
Cc: jiewen.yao@intel.com, liming.gao@intel.com,
	tengfen.sun@intel.com, chris.wu@intel.com
Subject: [PATCH 2/4] [staging/HBFA PATCH]: CmockaHostUnitTestPkg: Enable CmockaHostUnitTestPkg build.
Date: Wed, 22 May 2019 15:20:42 +0800	[thread overview]
Message-ID: <20190522072044.12472-3-tengfen.sun@intel.com> (raw)
In-Reply-To: <20190522072044.12472-1-tengfen.sun@intel.com>

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

Signed-off-by: Tengfen Sun <tengfen.sun@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


  parent reply	other threads:[~2019-05-22  7:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22  7:20 [PATCH 0/4] [staging/HBFA PATCH]: Enable cmocka unit test build with submodule Sun, Tengfen
2019-05-22  7:20 ` [PATCH 1/4] [staging/HBFA PATCH]: CmockaHostUnitTestPkg: Add cmocka submodule Sun, Tengfen
2019-05-22  7:20 ` Sun, Tengfen [this message]
2019-05-22  7:20 ` [PATCH 3/4] [staging/HBFA PATCH]: UefiHostUnitTestCasePkg: Add CmockaLib Sun, Tengfen
2019-05-22  7:20 ` [PATCH 4/4] [staging/HBFA PATCH]: UefiHostUnitTestPkg: Enable cmocka unit test build with CmockaHostUnitTestPkg Sun, Tengfen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190522072044.12472-3-tengfen.sun@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox