sf-package/build.xml
author Simon Howkins <simonh@symbian.org>
Wed, 27 Oct 2010 16:22:14 +0100
changeset 1316 0b4a09013baf
parent 1312 c2abb8ddb43c
permissions -rw-r--r--
Added copyright messages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1251
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
     2
<project name="SF-PACKAGE-CONFIG" xmlns:hlm="http://www.nokia.com/helium">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
     3
  <!-- location of this config -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
     4
  <dirname property="sf.package.config.dir" file="${ant.file.SF-PACKAGE-CONFIG}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
     5
  
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
     6
  <!-- import codeline-specific properties -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
     7
  <import file="${sf.package.config.dir}/${sf.spec.job.codeline}_props.ant.xml" optional="yes"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
     8
  
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
     9
  <!-- import package properties -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    10
  <import file="${sf.package.config.dir}/package_props.ant.xml" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    11
  
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    12
  <!-- import common properties/targets/references -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    13
  <import file="../common/build.xml" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    14
  
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    15
  <!-- import package references -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    16
  <import file="${sf.package.config.dir}/package_refs.ant.xml" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    17
  
1312
c2abb8ddb43c Removed support for Helium 5, and therefore was able to simplify sf-compile significantly.
Simon Howkins <simonh@symbian.org>
parents: 1258
diff changeset
    18
  <target name="sf-ensure-v2-sysdef">
1251
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    19
    <!-- Check that package_definition is not in v 3.0.0 otherwise transforms it to 2.0.1 -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    20
    <echo message="Check that model file is in a version usable by Raptor"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    21
    <exec executable="perl" dir="${sf.common.config.dir}/sysdefdowngrade" failonerror="false" output="${build.log.dir}/sysdefdowngrade.log">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    22
      <arg value="sysdefdowngrade.pl"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    23
      <arg value="--model=${build.drive}/${sf.spec.systemdefinition.location}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    24
      <arg value="--sources=${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    25
    </exec>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    26
  </target>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    27
  
1312
c2abb8ddb43c Removed support for Helium 5, and therefore was able to simplify sf-compile significantly.
Simon Howkins <simonh@symbian.org>
parents: 1258
diff changeset
    28
  <target name="sf-compile" depends="sf-ensure-v2-sysdef">
1251
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    29
    <!-- build stuff -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    30
    <for list="${sf.spec.sbs.config}" delimiter="," param="item.sbs.splitconfig">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    31
      <sequential>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    32
      
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    33
      <hlm:sbsinput id="sf.build">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    34
        <sbsOptions>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    35
            <arg line="-c @{item.sbs.splitconfig}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    36
            <arg line="-k" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    37
            <arg line="-j ${sf.spec.sbs.numberofjobs}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    38
            <arg line="-t ${sf.spec.sbs.retry.limit}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    39
            <arg line="${sf.spec.sbs.options}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    40
            <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    41
            <arg name="--logfile" value="${build.log.dir}/${build.id}_@{item.sbs.splitconfig}_compile.log" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    42
            <arg name="--makefile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_Makefile" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    43
        </sbsOptions>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    44
      </hlm:sbsinput>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    45
      
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    46
      <echo message="INFO [Iterative compile] Building target: @{item.sbs.splitconfig}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    47
      <antcall target="compile-main" inheritAll="false" inheritRefs="true">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    48
          <param name="build.system" value="${sf.spec.build.system}" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    49
          <param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    50
          <param name="sbs.inputs.list" value="sf.build"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    51
          <reference refid="sf.spec.system.definition.files" torefid="system.definition.files" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    52
      </antcall>    
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    53
      </sequential>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    54
    </for>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    55
    <!-- build test code -->	
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    56
    <if><istrue value="${sf.spec.package.test.enable}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    57
        <then>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    58
            <for list="${sf.spec.sbs.config}" delimiter="," param="item.sbs.splitconfig">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    59
              <sequential>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    60
      
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    61
              <hlm:sbsinput id="sf.build">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    62
                <sbsOptions>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    63
                    <arg line="-c @{item.sbs.splitconfig}.test"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    64
                    <arg line="-k" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    65
                    <arg line="-j ${sf.spec.sbs.numberofjobs}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    66
                    <arg line="-t ${sf.spec.sbs.retry.limit}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    67
                    <arg line="${sf.spec.sbs.options}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    68
                    <arg name="--filters" value="&quot;${sf.spec.sbs.filter.list}&quot;"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    69
                    <arg name="--logfile" value="${build.log.dir}/${build.id}_@{item.sbs.splitconfig}_compile.log" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    70
                    <arg name="--makefile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_Makefile" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    71
                </sbsOptions>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    72
              </hlm:sbsinput>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    73
      
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    74
              <echo message="INFO [Iterative compile] Building target: @{item.sbs.splitconfig}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    75
              <antcall target="compile-main" inheritAll="false" inheritRefs="true">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    76
                  <param name="build.system" value="${sf.spec.build.system}" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    77
                  <param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    78
                  <param name="sbs.inputs.list" value="sf.build"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    79
                  <reference refid="sf.spec.system.definition.files" torefid="system.definition.files" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    80
              </antcall>    
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    81
              </sequential>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    82
           </for>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    83
         </then>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    84
    </if>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    85
    
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    86
    <!-- CHECK -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    87
    <exec executable="cmd" dir="${build.drive}/" output="${build.drive}/output\logs\build_check_compile.log">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    88
      <arg value="/c sbs.bat -s ${build.drive}/output\build\canonical_system_definition_SF.xml -k -c tools2_rel -c winscw -c armv5 -j 32 --check -m ${build.drive}/output\logs\build_check_Makefile"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    89
      <!-- argument of -j option can be parameterized with: ${number.of.threads} -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    90
    </exec>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    91
  </target>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    92
        
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    93
  <target name="sf-test-package">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    94
    <echo message="INFO Preparing package"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    95
    <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" output="${build.log.dir}/ATS_${build.id}_prep_package.log">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    96
        <arg value="hlm_prep_package.pl"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    97
        <arg value="--csv-file=${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    98
        <arg value="--bld-drive=${build.drive}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
    99
    </exec>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   100
  
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   101
    <echo message="INFO Building package test drop(s)"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   102
<!--    <runtarget target="ats-test"/> --> <!-- Supported from Helium 9.0.5 onwards -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   103
    <echo message="INFO Skipped - Helium 9.0.5+ required"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   104
	
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   105
    <for param="file">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   106
        <path>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   107
            <fileset dir="${build.drive}/output/ats" includes="*.zip"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   108
        </path>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   109
        <sequential>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   110
            <propertyregex override="yes" property="program"  input="@{file}" regexp="([^\\/\/]*)$" select="\1"/>  						
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   111
            <echo message="INFO Updating package test drop with test info"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   112
            <echo message="************ Test drop name:  ${program} " />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   113
            <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_packagetest.log">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   114
                <arg value="ats_specialise_test_drop.pl"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   115
                <arg value="--test-drop-name=${env.COMPUTERNAME}-packagetest-${build.id}_${program}"/> 
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   116
                <arg value="--host-name=${env.COMPUTERNAME}.ad-sfpd.intra"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   117
                <arg value="--src=${build.drive}/output/ats/${program}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   118
                <arg value="--dest=${sf.spec.test.package.location}\${env.COMPUTERNAME}-packagetest-${build.id}_${program}" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   119
                <arg value="--publish=${publish.dir}\ats_reports\${program}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   120
                <arg value="--ats-version=ats4"/> <!-- Hard-coded ats-version as Test Drop Generator for WINSCW supports only ATS4 -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   121
            </exec>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   122
            <!-- Now ready to send to ATS -->  
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   123
            <echo message="Sending test drop :  ${program} ............" />
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   124
            <antcall target="sf-send-testpkg" inheritAll="false">
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   125
                <param name="sf.spec.test.package.name" value="${env.COMPUTERNAME}-packagetest-${build.id}_${program}"/>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   126
            </antcall>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   127
        </sequential>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   128
    </for>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   129
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   130
  </target>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   131
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   132
  <target name="ats-emulator-zip"/> <!-- This is to override exisiting Helium target called from ats-test -->
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   133
  
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   134
</project>
0fc9e31020ea Bug 3679
Johan Groth <johang@symbian.org>
parents: 1208
diff changeset
   135