common/build.test.xml
changeset 413 ef45bb759728
parent 393 8db8dd000e3b
child 441 efd6b490c9fa
equal deleted inserted replaced
412:e7e26750f383 413:ef45bb759728
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <project name="SF-COMMON-TEST" xmlns:hlm="http://www.nokia.com/helium">
       
     3 
       
     4     <target name="sf-find-ATS-worker-root">
       
     5       <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/devices" failonerror="false" outputproperty="sf.spec.test.workerroot">
       
     6         <arg value="-pe"/>
       
     7         <arg value="&quot;m/TEMPDIR=(\S+)/;print $1;s/.*\n//g&quot;"/>
       
     8         <arg value="${env.COMPUTERNAME}\EMULATOR_GENERIC_${env.COMPUTERNAME}.properties" /> 
       
     9       </exec>
       
    10       <echo message="ATS Worker Root = ${sf.spec.test.workerroot}"/> 
       
    11     </target>
       
    12     
       
    13     <target name ="sf-make-junction" depends="sf-find-ATS-worker-root">        
       
    14         <mkdir dir="${sf.spec.test.workerroot}/${sf.spec.test.epocroot}"/>
       
    15         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_make_junction.log">
       
    16         <arg value="make_junction.pl"/>
       
    17         <arg value="--link=${sf.spec.test.workerroot}/${sf.spec.test.epocroot}/epoc32"/>
       
    18         <arg value="--target=${build.drive}/epoc32"/>
       
    19         <arg value="--force"/>
       
    20       </exec>
       
    21     </target>
       
    22 
       
    23     <target name ="sf-delete-junction" depends="sf-find-ATS-worker-root">
       
    24         <exec executable="junction.exe" dir="${sf.spec.test.workerroot}/${sf.spec.test.epocroot}" failonerror="false" output="${build.log.dir}/ATS_${build.id}_delete_junction.log">
       
    25         <arg value="-d"/>
       
    26         <arg value="epoc32"/>
       
    27       </exec>
       
    28     </target>  
       
    29 
       
    30 <!-- static and dynamic BC Test target -->
       
    31     <target name="sf-bc-check">
       
    32         <if><isset property="env.PDT_HOME"/>
       
    33         <then>
       
    34             <!-- create BC dir -->
       
    35             <mkdir dir="${build.log.dir}/BC"/>
       
    36             <delete file="${build.log.dir}/BC/bc.config" quiet="true"/>
       
    37             <delete file="${build.log.dir}/BC/BBCResults.xsl" quiet="true"/>
       
    38             <delete file="${build.log.dir}/BC/libraries.txt" quiet="true"/>
       
    39             <delete file="${build.log.dir}/BC/libraries_report.xml" quiet="true"/>
       
    40             <delete file="${build.log.dir}/BC/headers.txt" quiet="true"/>
       
    41             <delete file="${build.log.dir}/BC/headers_report.xml" quiet="true"/>
       
    42 
       
    43             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
    44                 <arg value="/c"/>
       
    45                 <arg value="echo"/>
       
    46                 <arg value="BASELINE_NAME=${sf.spec.bccheck.baseline.name}"/>
       
    47             </exec>
       
    48             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
    49                 <arg value="/c"/>
       
    50                 <arg value="echo"/>
       
    51                 <arg value="BASELINE_SDK_DIR=${sf.spec.bccheck.baseline.skd.dir}"/>
       
    52             </exec>
       
    53             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
    54                 <arg value="/c"/>
       
    55                 <arg value="echo"/>
       
    56                 <arg value="BASELINE_SDK_S60_VERSION=${sf.spec.bccheck.baseline.s60.version}"/>
       
    57             </exec>
       
    58             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
    59                 <arg value="/c"/>
       
    60                 <arg value="echo"/>
       
    61                 <arg value="CURRENT_NAME=${build.id}"/>
       
    62             </exec>
       
    63             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
    64                 <arg value="/c"/>
       
    65                 <arg value="echo"/>
       
    66                 <arg value="CURRENT_SDK_DIR=${build.drive}"/>
       
    67             </exec>
       
    68             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
    69                 <arg value="/c"/>
       
    70                 <arg value="echo"/>
       
    71                 <arg value="CURRENT_SDK_S60_VERSION=${sf.spec.bccheck.current.s60.version}"/>
       
    72             </exec>
       
    73 
       
    74             <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/BBCResults.xsl" tofile="${build.log.dir}/BC/BBCResults.xsl" failonerror="false" verbose="true"/>
       
    75 
       
    76             <if><istrue value="${sf.spec.bccheck.enable.la}"/>
       
    77                 <then>
       
    78                     <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/libraries.txt">
       
    79                         <arg value="CheckBC.py"/>
       
    80                         <arg value="${build.log.dir}/BC/bc.config"/>
       
    81                         <arg value="-la"/>
       
    82                         <arg value="-f"/>
       
    83                         <arg value="${sf.spec.bccheck.reportid}"/>
       
    84                     </exec>
       
    85                     <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Libraries_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/libraries_report.xml" failonerror="false" verbose="true"/>
       
    86                 </then>
       
    87             </if>
       
    88 
       
    89             <if><istrue value="${sf.spec.bccheck.enable.ha}"/>
       
    90                 <then>
       
    91                     <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/headers.txt">
       
    92                         <arg value="CheckBC.py"/>
       
    93                         <arg value="${build.log.dir}/BC/bc.config"/>
       
    94                         <arg value="-ha"/>
       
    95                         <arg value="-f"/>
       
    96                         <arg value="${sf.spec.bccheck.reportid}"/>
       
    97                     </exec>
       
    98                     <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Headers_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/headers_report.xml" failonerror="false" verbose="true"/>
       
    99                 </then>
       
   100             </if>
       
   101 
       
   102             <if><istrue value="${sf.spec.bccheck.enable.dynamic}"/>
       
   103                 <then>
       
   104                     <for param="file">
       
   105 						<path>
       
   106 							<fileset dir="${sf.spec.test.package.location}/../bctest" includes="*.zip"/>
       
   107 						</path>
       
   108 						<sequential>
       
   109 							<propertyregex override="yes" property="program"  input="@{file}" regexp="([^\\/\/]*)$" select="\1"/>  						
       
   110                             <echo message="INFO Updating bctest package with test info"/>
       
   111 					        <echo message="************ Test drop package name:  ${program} " />
       
   112                             <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_dynamicbc.log">
       
   113                               <arg value="ats_specialise_test_drop.pl"/>
       
   114                               <arg value="--test-drop-name=${env.COMPUTERNAME}-bctest-${build.id}_${program}"/> 
       
   115                               <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
       
   116                               <arg value="--src=${sf.spec.test.package.location}/../bctest/${program}"/>
       
   117                               <arg value="--dest=${sf.spec.test.package.location}\${env.COMPUTERNAME}-bctest-${build.id}_${program}" />						 
       
   118                             </exec>
       
   119                             <!-- Now ready to send to ATS3 -->  
       
   120 					      <echo message="Sending Test drop :  ${program} ............" />									
       
   121 					<antcall target="sf-send-testpkg" inheritAll="false">
       
   122                         <param name="sf.spec.test.package.name" value="${env.COMPUTERNAME}-bctest-${build.id}_${program}"/>
       
   123                     </antcall>					
       
   124 							
       
   125 						</sequential>
       
   126   
       
   127 					</for>
       
   128 				</then>
       
   129 			</if>
       
   130 		</then>
       
   131         <else>
       
   132             <echo message="WARNING: PDT_HOME not set, I dont know where the BC tools are installed so cannot continue"/>
       
   133         </else>
       
   134 		</if>	
       
   135     </target>
       
   136     
       
   137 	<!-- Preparing smoketest package (zip) for sending to ATS3 -->
       
   138 	
       
   139 	<target name="sf-build-smoketestpkg" depends="sf-getenv-tools">
       
   140         <delete dir  ="${build.drive}/smoketest"/>
       
   141         <delete file ="${build.log.dir}/ATS_${build.id}_smoketest.log"/>
       
   142         
       
   143         <echo message="INFO Copy smoketest source to EPOCROOT"/>
       
   144         
       
   145         <copy todir="${build.drive}/smoketest">
       
   146             <fileset dir="${sf.common.config.dir}/tools/ats/smoketest"/>
       
   147         </copy>
       
   148         
       
   149         <echo message="INFO Building smoketest"/>
       
   150         <exec executable="cmd" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   151             <arg value="/c"/>
       
   152             <arg value="sbs -b bld.inf -c winscw_udeb.test"/>
       
   153         </exec>
       
   154 
       
   155         <echo message="INFO Creating smoketest testpackage"/>
       
   156         <exec executable="perl" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   157             <arg value="smoketest.pl"/>
       
   158         </exec>
       
   159         <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"/>
       
   160         
       
   161         <echo message="INFO Updating smoketest package with test info"/>
       
   162         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   163             <arg value="ats_specialise_test_drop.pl"/>
       
   164             <arg value="--test-drop-name=Smoketest-${build.id}"/> 
       
   165             <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
       
   166             <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
       
   167             <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>	
       
   168             <arg value="--build-id=http://${sf.spec.publish.diamonds.server}${diamonds.build.id}"/>			
       
   169         </exec>
       
   170         <!-- Now ready to send to ATS3 -->
       
   171     </target>   
       
   172 
       
   173 	<!-- Sending testdrop to ATS3 -->
       
   174 	
       
   175     <target name="sf-send-testpkg" depends="sf-find-ATS-worker-root,sf-make-junction">
       
   176         <mkdir dir="${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
       
   177         <echo message="Sending test package ${sf.spec.test.package.name} to ${sf.spec.test.host.name} path ${sf.spec.test.host.droppath}"/>
       
   178         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_testdrop.log">
       
   179             <arg value="ats3_testdrop.pl"/>
       
   180             <arg value="--host=${sf.spec.test.host.name}"/>
       
   181             <arg value="--username=${sf.spec.test.host.username}"/>
       
   182             <arg value="--password=${sf.spec.test.host.password}"/>
       
   183             <arg value="--local-test-pkg=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
       
   184             <arg value="--local-drop-path=${sf.spec.test.workerroot}\${sf.spec.test.package.droppath}"/>
       
   185             <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
       
   186         </exec>
       
   187     </target>
       
   188 </project>