common/build.xml
changeset 142 247e27021cd0
parent 141 228f8b438c19
child 150 15726eb85364
equal deleted inserted replaced
141:228f8b438c19 142:247e27021cd0
    22     <property name="publish" value="${sf.spec.publish.enable}"/>
    22     <property name="publish" value="${sf.spec.publish.enable}"/>
    23     <property name="publish.root.dir" value="${sf.spec.publish.rootdir}"/>
    23     <property name="publish.root.dir" value="${sf.spec.publish.rootdir}"/>
    24     <property name="build.system" value="${sf.spec.build.system}"/>
    24     <property name="build.system" value="${sf.spec.build.system}"/>
    25     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
    25     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
    26     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
    26     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
    27     
    27 
    28     <!-- import all core HELIUM targets -->
    28     <!-- import all core HELIUM targets -->
    29     <import file="${helium.dir}/helium.ant.xml" />
    29     <import file="${helium.dir}/helium.ant.xml" />
    30     
    30     
    31     <!-- import common references -->
    31     <!-- import common references -->
    32     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    32     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
   187         <exec executable="cmd" output="${build.drive}/output/logs/BOM/project.csv" append="true">
   187         <exec executable="cmd" output="${build.drive}/output/logs/BOM/project.csv" append="true">
   188             <arg value="/c"/>
   188             <arg value="/c"/>
   189             <arg value="echo"/>
   189             <arg value="echo"/>
   190             <arg value="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}"/>
   190             <arg value="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}"/>
   191         </exec>
   191         </exec>
   192         
   192 
       
   193         <!-- tools baseline must come before epoc baseline to allow clean listing -->
       
   194         <if>
       
   195             <istrue value="${sf.spec.toolsbaseline.enable}" />
       
   196             <then>
       
   197                 <!-- wrapper around preparation-getenv but with diff params -->
       
   198                 <runtarget target="sf-getenv-tools"/>
       
   199                 
       
   200                 <echo message="INFO Getting tools environment listing"/>
       
   201                 <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_toolsbaseline.log">
       
   202                     <arg value="${sf.common.config.dir}/tools/listdir.pl"/>
       
   203                     <arg value="${build.drive}/epoc32"/>
       
   204                 </exec>
       
   205             </then>
       
   206         </if>        
   193         <if>
   207         <if>
   194             <istrue value="${sf.spec.baseline.enable}" />
   208             <istrue value="${sf.spec.baseline.enable}" />
   195             <then>
   209             <then>
   196             
   210             
   197                 <!-- record baseline information in BOM file -->
   211                 <!-- record baseline information in BOM file -->
   209             <else>
   223             <else>
   210                 <!-- record fact that no baseline used. required by diamondize-bom  -->
   224                 <!-- record fact that no baseline used. required by diamondize-bom  -->
   211                 <touch file="${build.drive}/output/logs/BOM/baseline.txt"/>
   225                 <touch file="${build.drive}/output/logs/BOM/baseline.txt"/>
   212             </else>
   226             </else>
   213         </if>
   227         </if>
   214         
   228 
   215         <if>
   229         <if>
   216             <istrue value="${sf.spec.sourcesync.enable}" />
   230             <istrue value="${sf.spec.sourcesync.enable}" />
   217             <then>
   231             <then>
   218                 <runtarget target="sf-get-source"/>
   232                 <runtarget target="sf-get-source"/>
   219                 
   233                 
   267         </if>
   281         </if>
   268         </parallel>
   282         </parallel>
   269         
   283         
   270         <if><istrue value="${sf.spec.test.sendpkg.enable}"/>
   284         <if><istrue value="${sf.spec.test.sendpkg.enable}"/>
   271             <then>
   285             <then>
       
   286                 <runtarget target="sf-build-smoketestpkg"/>
   272                 <runtarget target="sf-send-testpkg"/>
   287                 <runtarget target="sf-send-testpkg"/>
   273             </then>
   288             </then>
   274         </if>
   289         </if>
   275 
   290 
   276         <!-- run build analysis tools -->
   291         <!-- run build analysis tools -->
   291             <then>
   306             <then>
   292                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
   307                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
   293                 <runtarget target="publish"/>
   308                 <runtarget target="publish"/>
   294             </then>
   309             </then>
   295         </if>
   310         </if>
       
   311     </target>
       
   312 
       
   313     <target name="sf-getenv-tools">
       
   314         <antcall target="preparation-getenv" inheritAll="false">
       
   315             <param name="base_release.path"           value="${sf.spec.toolsbaseline.location}"/>
       
   316             <param name="base_release.getenv_options" value="${sf.spec.toolsbaseline.getenv_options}"/>
       
   317         </antcall>
   296     </target>
   318     </target>
   297 
   319 
   298     <!-- package all logs into zipfile before publish -->
   320     <!-- package all logs into zipfile before publish -->
   299     <target name="sf-zip-logs">
   321     <target name="sf-zip-logs">
   300         <if>
   322         <if>
   539         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_testdrop.log">
   561         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_testdrop.log">
   540             <arg value="ats3_testdrop.pl"/>
   562             <arg value="ats3_testdrop.pl"/>
   541             <arg value="--host=${sf.spec.test.host.name}"/>
   563             <arg value="--host=${sf.spec.test.host.name}"/>
   542             <arg value="--username=${sf.spec.test.host.username}"/>
   564             <arg value="--username=${sf.spec.test.host.username}"/>
   543             <arg value="--password=${sf.spec.test.host.password}"/>
   565             <arg value="--password=${sf.spec.test.host.password}"/>
   544             <arg value="--local-test-pkg=${sf.spec.test.package.name}"/>
   566             <arg value="--local-test-pkg=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
   545             <arg value="--local-drop-path=${sf.spec.test.package.droppath}"/>
   567             <arg value="--local-drop-path=${sf.spec.test.package.droppath}"/>
   546             <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
   568             <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
   547         </exec>
   569         </exec>
   548     </target>
   570     </target>
   549   
   571 
       
   572     <target name="sf-build-smoketestpkg" depends="sf-getenv-tools">
       
   573         <delete dir  ="${build.drive}/smoketest"/>
       
   574         <delete file ="${build.log.dir}/ATS_${build.id}_smoketest.log"/>
       
   575         
       
   576         <echo message="INFO Copy smoketest source to EPOCROOT"/>
       
   577         
       
   578         <copy todir="${build.drive}/smoketest">
       
   579             <fileset dir="${sf.common.config.dir}/tools/ats/smoketest"/>
       
   580         </copy>
       
   581         
       
   582         <echo message="INFO Building smoketest"/>
       
   583         <exec executable="cmd" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   584             <arg value="/c"/>
       
   585             <arg value="sbs -b bld.inf -c winscw.test"/>
       
   586         </exec>
       
   587 
       
   588         <echo message="INFO Creating smoketest testpackage"/>
       
   589         <exec executable="cmd" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   590             <arg value="/c"/>
       
   591             <arg value="smoketest.pl"/>
       
   592         </exec>
       
   593         <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"/>
       
   594         
       
   595         <echo message="INFO Updating smoketest package with test info"/>
       
   596         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   597             <arg value="ats_specialise_test_drop.pl"/>
       
   598             <arg value="--test-drop-name=Smoketest-${build.id}"/> 
       
   599             <arg value="--device-name=ATSINTERFACE EMULATOR on ${env.COMPUTERNAME}"/>
       
   600             <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
       
   601             <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
       
   602 
       
   603         </exec>
       
   604         <!-- Now ready to send to ATS3 -->
       
   605     </target>   
       
   606 
   550     <!-- runs analysis of missing bins and source -->
   607     <!-- runs analysis of missing bins and source -->
   551     <target name="sf-run-analysis">
   608     <target name="sf-run-analysis">
   552         <mkdir dir="${build.log.dir}/analysis"/>
   609         <mkdir dir="${build.log.dir}/analysis"/>
   553 
   610 
   554         <echo message="Running source analysis of ANT output"/>
   611         <echo message="Running source analysis of ANT output"/>