BaseTools: Fix the bug to display the single SKUID info
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 21 Feb 2018 02:09:03 +0000 (10:09 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Fri, 23 Feb 2018 10:48:03 +0000 (18:48 +0800)
when defined SKUID_IDENTIFIER = DEFAULT|TEST in DSC [Defines] section,
per spec it means current SKUID is single, the bug is build report print
both DEFAULT and TEST info, it should only print TEST.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/Common/Misc.py

index b13e35cd75421b414a2880c274e603f0d1f82ac1..1461d00669c20e54542f954d1bd336fe19a0a495 100644 (file)
@@ -2239,6 +2239,10 @@ class SkuClass():
             GlobalData.gSkuids = (self.SkuIdSet)\r
             if 'COMMON' in GlobalData.gSkuids:\r
                 GlobalData.gSkuids.remove('COMMON')\r
+            if self.SkuUsageType == self.SINGLE:\r
+                if len(GlobalData.gSkuids) != 1:\r
+                    if 'DEFAULT' in GlobalData.gSkuids:\r
+                        GlobalData.gSkuids.remove('DEFAULT')\r
             if GlobalData.gSkuids:\r
                 GlobalData.gSkuids.sort()\r
 \r