From 26c381801126527943b08ee1cff4133dfcfd3d77 Mon Sep 17 00:00:00 2001 From: Bret Barkelew Date: Thu, 28 Jan 2021 03:33:13 +0000 Subject: [PATCH] UnitTestFrameworkPkg: Move common includes to their own file Previously, the UnitTestFrameworkPkgHost.dsc.inc included the entire UnitTestFrameworkPkgTarget.dsc.inc file. This is unnecessary for most configurations, so copy the relevant common components to a separate file. This is required for stack cookies so that we can have stack cookies on target based test apps but not on host base test apps. Signed-off-by: Oliver Smith-Denny --- .../UnitTestFrameworkPkgCommon.dsc.inc | 22 +++++++++++++++++++ .../UnitTestFrameworkPkgHost.dsc.inc | 2 +- .../UnitTestFrameworkPkgTarget.dsc.inc | 13 ++--------- 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 UnitTestFrameworkPkg/UnitTestFrameworkPkgCommon.dsc.inc diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgCommon.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgCommon.dsc.inc new file mode 100644 index 0000000000..0de6e4362b --- /dev/null +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgCommon.dsc.inc @@ -0,0 +1,22 @@ +## @file +# UnitTestFrameworkPkg DSC include file for host and target based test DSC +# +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[LibraryClasses] + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + UnitTestPersistenceLib|UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.inf + UnitTestResultReportLib|UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.inf + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf + +[PcdsFixedAtBuild] + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 + +[BuildOptions] + MSFT:*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES -D EDKII_UNIT_TEST_FRAMEWORK_ENABLED + GCC:*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES -D EDKII_UNIT_TEST_FRAMEWORK_ENABLED + XCODE:*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES -D EDKII_UNIT_TEST_FRAMEWORK_ENABLED diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc index 83d3205b63..0747229d05 100644 --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc @@ -6,7 +6,7 @@ # ## -!include UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc +!include UnitTestFrameworkPkg/UnitTestFrameworkPkgCommon.dsc.inc [LibraryClasses.common.HOST_APPLICATION] BaseLib|MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc index 06c40f24f2..fdec9c6e00 100644 --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc @@ -6,6 +6,8 @@ # ## +!include UnitTestFrameworkPkg/UnitTestFrameworkPkgCommon.dsc.inc + [LibraryClasses] # # Entry point @@ -15,15 +17,12 @@ UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf BaseLib|MdePkg/Library/BaseLib/BaseLib.inf - BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf - PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf - PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf UnitTestLib|UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.inf @@ -59,11 +58,3 @@ [LibraryClasses.common.UEFI_APPLICATION] UnitTestResultReportLib|UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.inf - -[PcdsFixedAtBuild] - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 - -[BuildOptions] - MSFT:*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES -D EDKII_UNIT_TEST_FRAMEWORK_ENABLED - GCC:*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES -D EDKII_UNIT_TEST_FRAMEWORK_ENABLED - XCODE:*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES -D EDKII_UNIT_TEST_FRAMEWORK_ENABLED