buildframework/helium/tools/quality/compatibility_analyser/compatibility.ant.xml
changeset 628 7c4a911dc066
child 645 b8d81fa19e7d
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <!-- 
       
     3 ============================================================================ 
       
     4 Name        : compatibility.ant.xml 
       
     5 Part of     : Helium 
       
     6 
       
     7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     8 All rights reserved.
       
     9 This component and the accompanying materials are made available
       
    10 under the terms of the License "Eclipse Public License v1.0"
       
    11 which accompanies this distribution, and is available
       
    12 at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    13 
       
    14 Initial Contributors:
       
    15 Nokia Corporation - initial contribution.
       
    16 
       
    17 Contributors:
       
    18 
       
    19 Description:
       
    20 
       
    21 ============================================================================
       
    22 -->
       
    23 <project name="compatibility.analyser" xmlns:hlm="http://www.nokia.com/helium">
       
    24     <description>
       
    25         Compatibility Analyser - BC (Binary Comparison) needs the property ca.enabled to
       
    26         be set to true in order to run the targets bc-check and ca-generate-diamond-summary
       
    27     </description>
       
    28 
       
    29     <!-- The following parameters need to be set up by the IDO before CheckBC.py will run -->
       
    30     <!-- place where the CheckBC and FilterBC tools are - required
       
    31     @type string
       
    32     @editable required
       
    33     @scope public
       
    34     -->
       
    35     <property name="bctools.root" location="E:\brtaylor\Apps\carbide\plugins\com.nokia.s60tools.compatibilityanalyser.corecomponents_2.0.0\BCTools" />
       
    36 
       
    37     <!-- Place where the CheckBC default configuration file is - required (see compatibility analyser user guide for details)
       
    38     it is copied from this location to the output folder  for use by checkBC.py
       
    39     @type string
       
    40     @editable required
       
    41     @scope public
       
    42     -->
       
    43     <property name="default.bc.config"  location="${helium.dir}/tools/quality/compatibility_analyser/ca_config_template.txt" />
       
    44 
       
    45     <!-- The bc_config_template.txt file (default configuration file) will be copied from the folder
       
    46     it is saved in within helium to the location named in this property where it will be used.
       
    47     @type string
       
    48     @editable required
       
    49     @scope public
       
    50     -->
       
    51     <property name="bc.config.dir" location="${build.log.dir}/bc" />
       
    52 
       
    53     <!-- The bc_config_template.txt file (default configuration file) will be copied from the
       
    54     folder it is saved in within helium to the location and file name named in this property 
       
    55     where it will be used. You need to make sure this is 
       
    56     not the same name as any other IDO or person using the build area
       
    57     @type string
       
    58     @editable required
       
    59     @scope public
       
    60     -->
       
    61     <property name="bc.config.file" location="${bc.config.dir}/bc.config" />
       
    62 
       
    63     <!-- Enables the Binary Comparison for libraries when set to true
       
    64     @type boolean
       
    65     @editable required
       
    66     @scope public
       
    67     -->
       
    68     <property name="bc.check.libraries.enabled" value="true" />
       
    69     
       
    70     <!-- Defines the parameter that checkBC.py is called with 
       
    71        -la (all libraries checked) 
       
    72     or -ls lib (single library checked) (lib = the name of library to check)
       
    73     or -lm file.name (multiple libraries checked) 
       
    74     the file.name is a file that contains the names of the library(ies) to check 
       
    75     @type string
       
    76     @editable required
       
    77     @scope public
       
    78     -->
       
    79     <property name="lib.param.val" value="-la" />
       
    80 
       
    81     <!-- Enables the Binary Comparison for headers when set to true
       
    82     @type boolean
       
    83     @editable required
       
    84     @scope public
       
    85     -->
       
    86     <property name="bc.check.headers.enabled" value="true" />
       
    87     
       
    88     <!-- Defines the parameter that checkBC.py is called with 
       
    89        -ha (all headers checked) 
       
    90     or -hs file (single header checked) (file= name of header file to check) 
       
    91     or -hm file.name (multiple headers checked) 
       
    92     the file.name is a file that contains the names of the header(s) to check 
       
    93     @type string
       
    94     @editable required
       
    95     @scope public
       
    96     -->
       
    97     <property name="head.param.val" value="-ha" />
       
    98 
       
    99     <!-- Adds this to the CA output file name to give it a unique name
       
   100     @type string
       
   101     @editable required
       
   102     @scope public
       
   103     -->
       
   104     <property name="bc.check.report.id" value="${build.name}_${build.number}" />
       
   105 
       
   106     <!-- Defines the location of CA output and the input for the diamonds creation target.
       
   107     @type string
       
   108     -->
       
   109     <property name="ido.ca.html.output.dir" location="${build.log.dir}/${build.id}_ca"/>
       
   110 
       
   111     <condition property="internal.run.ca">
       
   112         <istrue value="${ca.enabled}" />
       
   113     </condition>
       
   114 
       
   115 
       
   116 <!-- static and dynamic BC Test target -->
       
   117     <target name="bc-check" if="internal.run.ca" >
       
   118         <!-- create BC dir -->
       
   119         <mkdir dir="${build.log.dir}/BC"/>
       
   120         <delete file="${bc.config.file}" quiet="true"/>
       
   121         <delete file="${build.log.dir}/BC/BBCResults.xsl" quiet="true"/>
       
   122 
       
   123         <copy file="${default.bc.config}" tofile="${bc.config.file}" failonerror="false" verbose="true"/>
       
   124 
       
   125         <!--copy the CSS file to the output folder-->
       
   126         <copy file="${bctools.root}/reports/BBCResults.xsl" tofile="${build.log.dir}/BC/BBCResults.xsl" failonerror="false" verbose="true"/>
       
   127 
       
   128         <if>    <!--the library check enaled flag is set then run the check on the lirary files-->
       
   129             <istrue value="${bc.check.libraries.enabled}"/>
       
   130             <then>
       
   131                 <exec executable="python" dir="${build.log.dir}/BC" failonerror="true">
       
   132                     <arg value="${bctools.root}/CheckBC.py"/>
       
   133                     <arg value="${bc.config.file}"/>
       
   134                     <arg line="${lib.param.val}"/>
       
   135                     <arg value="-f"/>
       
   136                     <arg value="${bc.check.report.id}"/>
       
   137                 </exec>
       
   138             </then>
       
   139         </if>
       
   140 
       
   141         <if>    <!-- if the header check flag is set then run the checks on the headers-->
       
   142             <istrue value="${bc.check.headers.enabled}"/>
       
   143             <then>
       
   144                 <exec executable="python" dir="${build.log.dir}/BC" failonerror="true">
       
   145                     <arg value="${bctools.root}/CheckBC.py"/>
       
   146                     <arg value="${bc.config.file}"/>
       
   147                     <arg line="${head.param.val}"/>
       
   148                     <arg value="-f"/>
       
   149                     <arg value="${bc.check.report.id}"/>
       
   150                 </exec>
       
   151             </then>
       
   152         </if>
       
   153     </target>
       
   154 
       
   155 
       
   156     <target name="ca-generate-diamond-summary" if="internal.run.ca">
       
   157         <!--use the header.ftl template file to create the init part of the output file
       
   158         that can be copied to the final output file by the java class-->
       
   159         <property name="temp.diamonds.header.xml" location="${env.TEMP}/diamonds_header.xml" />
       
   160         <fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_header.ftl" 
       
   161               outputfile="${temp.diamonds.header.xml}" quiet="true"/>
       
   162         <property name="temp.diamonds.footer.xml" location="${env.TEMP}/diamonds_footer.xml" />
       
   163         <fmpp sourcefile="${helium.dir}/tools/common/templates/diamonds/diamonds_footer.ftl" 
       
   164               outputfile="${temp.diamonds.footer.xml}" quiet="true"/>
       
   165 
       
   166         <mkdir dir="${diamonds.build.output.dir}" />
       
   167 
       
   168         <if>    <!-- if the header check flag is set then run the checks on the headers-->
       
   169             <istrue value="${bc.check.headers.enabled}"/>
       
   170             <then>
       
   171                 <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
       
   172                     header="true"
       
   173                     outputFile="${diamonds.build.output.dir}/ca_summary_header.xml"
       
   174                     inputFile="${bc.config.dir}/headers_report_${bc.check.report.id}.xml" 
       
   175                      />
       
   176             </then>
       
   177         </if>
       
   178 
       
   179         <if>    <!--the library check enaled flag is set then run the check on the lirary files-->
       
   180             <istrue value="${bc.check.libraries.enabled}"/>
       
   181             <then>
       
   182                 <hlm:casummary diamondsHeaderFileName="${temp.diamonds.header.xml}" diamondsFooterFileName="${temp.diamonds.footer.xml}"
       
   183                     header="false" 
       
   184                     outputFile="${diamonds.build.output.dir}/ca_summary_library.xml"
       
   185                     inputFile="${bc.config.dir}/libraries_report_${bc.check.report.id}.xml"
       
   186                     />
       
   187             </then>
       
   188         </if>
       
   189 
       
   190         <delete file="${temp.diamonds.header.xml}" failonerror="false" />
       
   191         <delete file="${temp.diamonds.footer.xml}" failonerror="false" />
       
   192     </target>
       
   193 
       
   194 </project>