From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web11.4378.1594267536731145998 for ; Wed, 08 Jul 2020 21:05:38 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) IronPort-SDR: Q4TwHSBz1nh2GhCu/j590xDlmWzQTg+c35sDDc+J3yT7mqloIt81ysbBuOCsRNaRJvlaix2dY8 qQnOT568v+Gw== X-IronPort-AV: E=McAfee;i="6000,8403,9676"; a="212851100" X-IronPort-AV: E=Sophos;i="5.75,330,1589266800"; d="scan'208";a="212851100" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 21:05:38 -0700 IronPort-SDR: qwREu3NiiIGkp7UC66v7pJaynHNEeqqXlFSK/pEQQBawSTnCQTvbMhGKT3llFjT73P9Ld0RPxi QL+onNhXovnQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,330,1589266800"; d="scan'208";a="280163934" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.255.230.8]) by orsmga003.jf.intel.com with ESMTP; 08 Jul 2020 21:05:37 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Sean Brogan , Bret Barkelew , Jiewen Yao Subject: [Patch v2 09/16] UnitTestFrameworkPkg: Change target mode DebugLib mapping Date: Wed, 8 Jul 2020 21:05:14 -0700 Message-Id: <20200709040521.3748-10-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200709040521.3748-1-michael.d.kinney@intel.com> References: <20200709040521.3748-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2801 The default DebugLib for target mode was DebugLibNull. This library instance disables all ASSERT() and DEBUG() macros which removes the ability to write unit tests that check for ASSERT() behaviors. The DebugLib is changed to PeiDxeDebugLibReportStatusCode.inf that guarantees that DEBUG() and ASSERT() macros are active. The default ReportStatusCodeLib is set to BaseReportStatusCodeLibNull.inf so no messages are sent to any devices preserving the DebugLibNull behavior. A platform specific unit test can always override these mappings with a platform specific DebugLib. Cc: Sean Brogan Cc: Bret Barkelew Cc: Jiewen Yao Signed-off-by: Michael D Kinney --- UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc index c29b056fca..0881278ab0 100644 --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc @@ -16,7 +16,9 @@ [LibraryClasses] BaseLib|MdePkg/Library/BaseLib/BaseLib.inf BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf - DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.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 -- 2.21.0.windows.1