From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2B97A226838F5 for ; Wed, 18 Apr 2018 01:56:10 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2018 01:56:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,464,1517904000"; d="scan'208";a="47103123" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by fmsmga004.fm.intel.com with ESMTP; 18 Apr 2018 01:56:08 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Yunhua Feng , Liming Gao Date: Wed, 18 Apr 2018 16:56:04 +0800 Message-Id: <1524041764-36404-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [PATCH] BaseTools: Parse DSC component !include file report error issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2018 08:56:10 -0000 From: Yunhua Feng DSC format: [Components] !include TestPkg/Test.dsc if the Test.dsc have a INF, and the INF not exist, current the error message is not clearly. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index f4c1868483..f74e8edbb2 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1616,10 +1616,16 @@ class DscParser(MetaFileParser): except Exception: print ValList def __ProcessComponent(self): self._ValueList[0] = ReplaceMacro(self._ValueList[0], self._Macros) + ModuleFile = PathClass(self._ValueList[0], GlobalData.gWorkspace, Arch=self._Arch) + # check the file validation + ErrorCode, ErrorInfo = ModuleFile.Validate('.inf') + if ErrorCode != 0: + EdkLogger.error('build', ErrorCode, File=self._FileWithError.Path, Line=self._LineIndex + 1, + ExtraData=ErrorInfo) def __ProcessSourceOverridePath(self): self._ValueList[0] = ReplaceMacro(self._ValueList[0], self._Macros) def __ProcessBuildOption(self): -- 2.12.2.windows.2