Report.py revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
2N/A# This file is used to create report for Eot tool 2N/A# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR> 2N/A# This program and the accompanying materials 2N/A# are licensed and made available under the terms and conditions of the BSD License 2N/A# which accompanies this distribution. The full text of the license may be found at 2N/A# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 2N/A# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 2N/A# This class defined Report 2N/A# @param object: Inherited from object class 2N/A # @param self: The object pointer 2N/A # @param ReportName: name of the report 2N/A # @param FvObj: FV object after parsing FV images # Write a line in the report # @param self: The object pointer # @param Line: The lint to be written into ## GenerateReport() method # A caller to generate report # @param self: The object pointer ## GenerateUnDispatchedList() method # Create a list for not dispatched items # @param self: The object pointer # Generate FV information # @param self: The object pointer <td width="20%%"><strong>Name</strong></td> <td width="60%%"><strong>Guid</strong></td> <td width="20%%"><strong>Size</strong></td> Content =
""" <td colspan="3"><table width="100%%" border="1"> Content =
""" <td colspan="3"><table width="100%%" border="1"> <tr><strong>UnDispatched</strong></tr>""" ## GenerateDepex() method # Generate Depex information # @param self: The object pointer # @param DepexString: A DEPEX string needed to be parsed NonGuidList = [
'AND',
'OR',
'NOT',
'BEFORE',
'AFTER',
'TRUE',
'FALSE']
SqlCommand =
"""select DISTINCT GuidName from Report where GuidValue like '%s' and ItemMode = 'Produced' group by GuidName""" % (
Item)
# Generate PPI information # @param self: The object pointer # @param Name: CName of a GUID # @param Guid: Value of a GUID # @param Type: Type of a GUID ## GenerateProtocol() method # Generate PROTOCOL information # @param self: The object pointer # @param Name: CName of a GUID # @param Guid: Value of a GUID # @param Type: Type of a GUID ## GeneratePpiProtocol() method # @param self: The object pointer # @param Model: Model of a GUID, PPI or PROTOCOL # @param Name: Name of a GUID # @param Guid: Value of a GUID # @param Type: Type of a GUID # @param CName: CName(Index) of a GUID <td width="85%%" colspan="3">%s</td> SqlCommand =
"""select DISTINCT SourceFileFullPath, BelongsToFunction from Report where GuidName like '%s' and ItemMode = 'Callback'""" %
Name select DISTINCT BelongsToFile from Inf where Value1 like '%s')""" %
Record[
0]
# Generate FFS information # @param self: The object pointer # @param FfsObj: FFS object after FV image is parsed # Hard code for Binary INF if FfsGuid.
upper() ==
'7BB28B99-61BB-11D5-9A5D-0090273FC14D':
if FfsGuid.
upper() ==
'7E374E25-8E01-4FEE-87F2-390C23C606CD':
if FfsGuid.
upper() ==
'961578FE-B6B7-44C3-AF35-6BC705CD2B1F':
where BelongsToFile = (select BelongsToFile from Inf where Value1 = 'FILE_GUID' and lower(Value2) = lower('%s') and Model = %s) and Model = %s and Value1='BASE_NAME'""" % (
FfsGuid,
5001,
5001)
where ID = (select BelongsToFile from Inf where Value1 = 'FILE_GUID' and lower(Value2) = lower('%s') and Model = %s) and Model = %s""" % (
FfsGuid,
5001,
1011)
<tr class='styleFfs' id='FfsHeader%s'> <td width="55%%"><span onclick="Display('FfsHeader%s', 'Ffs%s')" onMouseOver="funOnMouseOver()" onMouseOut="funOnMouseOut()">%s</span></td> <!--<td width="20%%">%s</td>--> <!--<td width="20%%">%s</td>--> <tr id='Ffs%s' style='display:none;'> <td><span id='DepexHeader%s' class="styleDepex" onclick="Display('DepexHeader%s', 'Depex%s')" onMouseOver="funOnMouseOver()" onMouseOut="funOnMouseOut()">  DEPEX expression</span></td> <tr id='Depex%s' style='display:none;'> SqlCommand =
"""select ModuleName, ItemType, GuidName, GuidValue, GuidMacro from Report where SourceFileFullPath in (select Value1 from Inf where BelongsToFile = (select BelongsToFile from Inf where Value1 = 'FILE_GUID' and Value2 like '%s' and Model = %s) and ItemMode = 'Consumed' group by GuidName order by ItemType""" \
<td><span id='ConsumedHeader%s' class="styleConsumed" onclick="Display('ConsumedHeader%s', 'Consumed%s')" onMouseOver="funOnMouseOver()" onMouseOut="funOnMouseOut()">  Consumed Ppis/Protocols List (%s)</span></td> <tr id='Consumed%s' style='display:none;'> SqlCommand =
"""select ModuleName, ItemType, GuidName, GuidValue, GuidMacro from Report where SourceFileFullPath in (select Value1 from Inf where BelongsToFile = (select BelongsToFile from Inf where Value1 = 'FILE_GUID' and Value2 like '%s' and Model = %s) and ItemMode = 'Produced' group by GuidName order by ItemType""" \
<td><span id='ProducedHeader%s' class="styleProduced" onclick="Display('ProducedHeader%s', 'Produced%s')" onMouseOver="funOnMouseOver()" onMouseOut="funOnMouseOut()">  Produced Ppis/Protocols List (%s)</span></td> <tr id='Produced%s' style='display:none;'> # Generate end tags of HTML report # @param self: The object pointer ## GenerateHeader() method # Generate start tags of HTML report # @param self: The object pointer Header =
"""<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" <title>Execution Order Tool Report</title> <meta http-equiv="Content-Type" content="text/html"> function Display(ParentID, SubID) SubItem = document.getElementById(SubID); ParentItem = document.getElementById(ParentID); if (SubItem.style.display == 'none') SubItem.style.display = '' ParentItem.style.fontWeight = 'normal' SubItem.style.display = 'none' ParentItem.style.fontWeight = 'bold' function funOnMouseOver() document.body.style.cursor = "hand"; document.body.style.cursor = ""; <table width="100%%" border="1">""" # This acts like the main() function for the script, unless it is 'import'ed into another