From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: tengfen.sun@intel.com) Received: from mga12.intel.com (mga12.intel.com []) by groups.io with SMTP; Wed, 22 May 2019 00:21:23 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2019 00:21:23 -0700 X-ExtLoop1: 1 Received: from tiano-tengfens.ccr.corp.intel.com ([10.239.9.110]) by orsmga002.jf.intel.com with ESMTP; 22 May 2019 00:21:22 -0700 From: "Sun, Tengfen" 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 Message-Id: <20190522072044.12472-3-tengfen.sun@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190522072044.12472-1-tengfen.sun@intel.com> References: <20190522072044.12472-1-tengfen.sun@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Enable build for CmockaHostUnitTestPkg with cmocka submodule. REF: https://edk2.groups.io/g/devel/message/39893 Signed-off-by: Tengfen Sun --- .../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.
+# 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.
+# 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.
+# 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.
+// +// 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