From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.7294.1592180365215983703 for ; Sun, 14 Jun 2020 17:19:25 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: michael.d.kinney@intel.com) IronPort-SDR: ezLvSDXqhCuFipBBdt+AAkmuVQfHPQALnWWX+DmkSGZDBWIxCyxBfOmbSuAsOxHDNq980HzTzF 6t9xybNbHBpw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2020 17:19:24 -0700 IronPort-SDR: solXagOmvsdmS1Wot23YzQkcjbSrcaKP2hdOgUFWs339AnnVuTs92af0UBy3t5NpAaMceJy2F7 GPkrVUH+iCCQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,513,1583222400"; d="scan'208";a="276370263" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.252.142.246]) by orsmga006.jf.intel.com with ESMTP; 14 Jun 2020 17:19:24 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Sean Brogan , Bret Barkelew , Jiewen Yao Subject: [Patch 07/15] UnitTestFrameworkPkg: Enable source level debug for host tests Date: Sun, 14 Jun 2020 17:19:10 -0700 Message-Id: <20200615001918.22164-8-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200615001918.22164-1-michael.d.kinney@intel.com> References: <20200615001918.22164-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit https://bugzilla.tianocore.org/show_bug.cgi?id=2804 Optionally enable a feature to support source level debug of a host based unit test. By default, this feature is disabled. Exceptions are caught by the unit test framework and are interpreted as a test failure. When a unit test is under development, bugs may generate exceptions or a unit test developer may want to trace the execution of unit tests to debug some unexpected behavior. Defining UNIT_TESTING_DEBUG in the DSC file or from the build command line allows exceptions to be caught by the host OS and allows the developer to debug their unit test under development or debug the Unit Test Framework itself. Cc: Sean Brogan Cc: Bret Barkelew Cc: Jiewen Yao Signed-off-by: Michael D Kinney --- UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc index f6a5b16096..5de3c45d5a 100644 --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc @@ -19,6 +19,11 @@ [LibraryClasses.common.HOST_APPLICATION] [BuildOptions] GCC:*_*_*_CC_FLAGS = -fno-pie +!ifdef $(UNIT_TESTING_DEBUG) + MSFT:*_*_*_CC_FLAGS = -D UNIT_TESTING_DEBUG=1 + GCC:*_*_*_CC_FLAGS = -D UNIT_TESTING_DEBUG=1 + XCODE:*_*_*_CC_FLAGS = -D UNIT_TESTING_DEBUG=1 +!endif [BuildOptions.common.EDKII.HOST_APPLICATION] # -- 2.21.0.windows.1