1251
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<project name="SF-PACKAGE-CONFIG" xmlns:hlm="http://www.nokia.com/helium">
|
|
3 |
<!-- location of this config -->
|
|
4 |
<dirname property="sf.package.config.dir" file="${ant.file.SF-PACKAGE-CONFIG}"/>
|
|
5 |
|
|
6 |
<!-- import codeline-specific properties -->
|
|
7 |
<import file="${sf.package.config.dir}/${sf.spec.job.codeline}_props.ant.xml" optional="yes"/>
|
|
8 |
|
|
9 |
<!-- import package properties -->
|
|
10 |
<import file="${sf.package.config.dir}/package_props.ant.xml" />
|
|
11 |
|
|
12 |
<!-- import common properties/targets/references -->
|
|
13 |
<import file="../common/build.xml" />
|
|
14 |
|
|
15 |
<!-- import package references -->
|
|
16 |
<import file="${sf.package.config.dir}/package_refs.ant.xml" />
|
|
17 |
|
|
18 |
<target name="sf-compile">
|
|
19 |
|
|
20 |
<!-- Check that package_definition is not in v 3.0.0 otherwise transforms it to 2.0.1 -->
|
|
21 |
<echo message="Check that model file is in a version usable by Raptor"/>
|
|
22 |
<exec executable="perl" dir="${sf.common.config.dir}/sysdefdowngrade" failonerror="false" output="${build.log.dir}/sysdefdowngrade.log">
|
|
23 |
<arg value="sysdefdowngrade.pl"/>
|
|
24 |
<arg value="--model=${build.drive}/${sf.spec.systemdefinition.location}"/>
|
|
25 |
<arg value="--sources=${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
|
|
26 |
</exec>
|
|
27 |
|
|
28 |
<!-- helium 7+ should use new sf-package-compile target -->
|
|
29 |
<if>
|
|
30 |
<or>
|
|
31 |
<equals arg1="${helium.version}" arg2="7.0"/>
|
|
32 |
<equals arg1="${last.major.helium.version}" arg2="7.0"/>
|
|
33 |
</or>
|
|
34 |
<then>
|
|
35 |
<runtarget target="sf-package-compile"/>
|
|
36 |
</then>
|
|
37 |
<else>
|
|
38 |
<runtarget target="sf-package-compile-hlm-5"/>
|
|
39 |
</else>
|
|
40 |
</if>
|
|
41 |
|
|
42 |
</target>
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
<target name="sf-package-compile">
|
|
47 |
|
|
48 |
<!-- build stuff -->
|
|
49 |
<for list="${sf.spec.sbs.config}" delimiter="," param="item.sbs.splitconfig">
|
|
50 |
<sequential>
|
|
51 |
|
|
52 |
<hlm:sbsinput id="sf.build">
|
|
53 |
<sbsOptions>
|
|
54 |
<arg line="-c @{item.sbs.splitconfig}"/>
|
|
55 |
<arg line="-k" />
|
|
56 |
<arg line="-j ${sf.spec.sbs.numberofjobs}"/>
|
|
57 |
<arg line="-t ${sf.spec.sbs.retry.limit}"/>
|
|
58 |
<arg line="${sf.spec.sbs.options}"/>
|
|
59 |
<arg name="--filters" value=""${sf.spec.sbs.filter.list}""/>
|
|
60 |
<arg name="--logfile" value="${build.log.dir}/${build.id}_@{item.sbs.splitconfig}_compile.log" />
|
|
61 |
<arg name="--makefile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_Makefile" />
|
|
62 |
</sbsOptions>
|
|
63 |
</hlm:sbsinput>
|
|
64 |
|
|
65 |
<echo message="INFO [Iterative compile] Building target: @{item.sbs.splitconfig}"/>
|
|
66 |
<antcall target="compile-main" inheritAll="false" inheritRefs="true">
|
|
67 |
<param name="build.system" value="${sf.spec.build.system}" />
|
|
68 |
<param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
|
|
69 |
<param name="sbs.inputs.list" value="sf.build"/>
|
|
70 |
<reference refid="sf.spec.system.definition.files" torefid="system.definition.files" />
|
|
71 |
</antcall>
|
|
72 |
</sequential>
|
|
73 |
</for>
|
|
74 |
<!-- build test code -->
|
|
75 |
<if><istrue value="${sf.spec.package.test.enable}"/>
|
|
76 |
<then>
|
|
77 |
<for list="${sf.spec.sbs.config}" delimiter="," param="item.sbs.splitconfig">
|
|
78 |
<sequential>
|
|
79 |
|
|
80 |
<hlm:sbsinput id="sf.build">
|
|
81 |
<sbsOptions>
|
|
82 |
<arg line="-c @{item.sbs.splitconfig}.test"/>
|
|
83 |
<arg line="-k" />
|
|
84 |
<arg line="-j ${sf.spec.sbs.numberofjobs}"/>
|
|
85 |
<arg line="-t ${sf.spec.sbs.retry.limit}"/>
|
|
86 |
<arg line="${sf.spec.sbs.options}"/>
|
|
87 |
<arg name="--filters" value=""${sf.spec.sbs.filter.list}""/>
|
|
88 |
<arg name="--logfile" value="${build.log.dir}/${build.id}_@{item.sbs.splitconfig}_compile.log" />
|
|
89 |
<arg name="--makefile" value="${compile.log.dir}/${build.id}_@{item.sbs.splitconfig}_Makefile" />
|
|
90 |
</sbsOptions>
|
|
91 |
</hlm:sbsinput>
|
|
92 |
|
|
93 |
<echo message="INFO [Iterative compile] Building target: @{item.sbs.splitconfig}"/>
|
|
94 |
<antcall target="compile-main" inheritAll="false" inheritRefs="true">
|
|
95 |
<param name="build.system" value="${sf.spec.build.system}" />
|
|
96 |
<param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
|
|
97 |
<param name="sbs.inputs.list" value="sf.build"/>
|
|
98 |
<reference refid="sf.spec.system.definition.files" torefid="system.definition.files" />
|
|
99 |
</antcall>
|
|
100 |
</sequential>
|
|
101 |
</for>
|
|
102 |
</then>
|
|
103 |
</if>
|
|
104 |
|
|
105 |
<!-- CHECK -->
|
|
106 |
<exec executable="cmd" dir="${build.drive}/" output="${build.drive}/output\logs\build_check_compile.log">
|
|
107 |
<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"/>
|
|
108 |
<!-- argument of -j option can be parameterized with: ${number.of.threads} -->
|
|
109 |
</exec>
|
|
110 |
|
|
111 |
</target>
|
|
112 |
|
|
113 |
|
|
114 |
<target name="sf-package-compile-hlm-5">
|
|
115 |
|
|
116 |
<for list="${sf.spec.sbs.config}" delimiter="," param="item.sbs.splitconfig">
|
|
117 |
<sequential>
|
|
118 |
<echo message="INFO [Iterative compile] Building target: @{item.sbs.splitconfig}"/>
|
|
119 |
|
|
120 |
<!-- Do CLEAN
|
|
121 |
<hlm:argSet id="sbs.iterate.clean.var">
|
|
122 |
<hlm:arg name="config" value="@{item.sbs.splitconfig}" />
|
|
123 |
<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
|
|
124 |
<hlm:arg name="command" value="CLEAN"/>
|
|
125 |
</hlm:argSet>
|
|
126 |
<antcall target="compile-main" inheritAll="false" inheritRefs="true">
|
|
127 |
<param name="build.system" value="${sf.spec.build.system}" />
|
|
128 |
<param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
|
|
129 |
<reference refid="sbs.iterate.clean.var" torefid="sbs.var" />
|
|
130 |
<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
|
|
131 |
<reference refid="sf.spec.system.definition.files" torefid="system.definition.files" />
|
|
132 |
</antcall>
|
|
133 |
-->
|
|
134 |
|
|
135 |
<!-- Do BUILD -->
|
|
136 |
<hlm:argSet id="sbs.main.iterate.sbs.var">
|
|
137 |
<hlm:arg name="config" value="@{item.sbs.splitconfig}" />
|
|
138 |
<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
|
|
139 |
<hlm:arg name="retry-limit" value="${sf.spec.sbs.retry.limit}" />
|
|
140 |
</hlm:argSet>
|
|
141 |
<antcall target="compile-main" inheritAll="false" inheritRefs="true">
|
|
142 |
<param name="build.system" value="${sf.spec.build.system}" />
|
|
143 |
<param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
|
|
144 |
<reference refid="sbs.main.iterate.sbs.var" torefid="sbs.var" />
|
|
145 |
<reference refid="sbs.fullbuild.options" torefid="sbs.make.options" />
|
|
146 |
<reference refid="sf.spec.system.definition.files" torefid="system.definition.files" />
|
|
147 |
</antcall>
|
|
148 |
</sequential>
|
|
149 |
</for>
|
|
150 |
|
|
151 |
<!-- CHECK -->
|
|
152 |
<exec executable="cmd" dir="${build.drive}/" output="${build.drive}/output\logs\build_check_compile.log">
|
|
153 |
<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"/>
|
|
154 |
<!-- argument of -j option can be parameterized with: ${number.of.threads} -->
|
|
155 |
</exec>
|
|
156 |
|
|
157 |
</target>
|
|
158 |
|
|
159 |
|
|
160 |
<target name="sf-test-package">
|
|
161 |
|
|
162 |
<echo message="INFO Preparing package"/>
|
|
163 |
<exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" output="${build.log.dir}/ATS_${build.id}_prep_package.log">
|
|
164 |
<arg value="hlm_prep_package.pl"/>
|
|
165 |
<arg value="--csv-file=${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
|
|
166 |
<arg value="--bld-drive=${build.drive}"/>
|
|
167 |
</exec>
|
|
168 |
|
|
169 |
<echo message="INFO Building package test drop(s)"/>
|
|
170 |
<!-- <runtarget target="ats-test"/> --> <!-- Supported from Helium 9.0.5 onwards -->
|
|
171 |
<echo message="INFO Skipped - Helium 9.0.5+ required"/>
|
|
172 |
|
|
173 |
<for param="file">
|
|
174 |
<path>
|
|
175 |
<fileset dir="${build.drive}/output/ats" includes="*.zip"/>
|
|
176 |
</path>
|
|
177 |
<sequential>
|
|
178 |
<propertyregex override="yes" property="program" input="@{file}" regexp="([^\\/\/]*)$" select="\1"/>
|
|
179 |
<echo message="INFO Updating package test drop with test info"/>
|
|
180 |
<echo message="************ Test drop name: ${program} " />
|
|
181 |
<exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_packagetest.log">
|
|
182 |
<arg value="ats_specialise_test_drop.pl"/>
|
|
183 |
<arg value="--test-drop-name=${env.COMPUTERNAME}-packagetest-${build.id}_${program}"/>
|
|
184 |
<arg value="--host-name=${env.COMPUTERNAME}.ad-sfpd.intra"/>
|
|
185 |
<arg value="--src=${build.drive}/output/ats/${program}"/>
|
|
186 |
<arg value="--dest=${sf.spec.test.package.location}\${env.COMPUTERNAME}-packagetest-${build.id}_${program}" />
|
|
187 |
<arg value="--publish=${publish.dir}\ats_reports\${program}"/>
|
|
188 |
<arg value="--ats-version=ats4"/> <!-- Hard-coded ats-version as Test Drop Generator for WINSCW supports only ATS4 -->
|
|
189 |
</exec>
|
|
190 |
<!-- Now ready to send to ATS -->
|
|
191 |
<echo message="Sending test drop : ${program} ............" />
|
|
192 |
<antcall target="sf-send-testpkg" inheritAll="false">
|
|
193 |
<param name="sf.spec.test.package.name" value="${env.COMPUTERNAME}-packagetest-${build.id}_${program}"/>
|
|
194 |
</antcall>
|
|
195 |
</sequential>
|
|
196 |
</for>
|
|
197 |
|
|
198 |
</target>
|
|
199 |
|
|
200 |
<target name="ats-emulator-zip"/> <!-- This is to override exisiting Helium target called from ats-test -->
|
|
201 |
|
|
202 |
</project>
|
|
203 |
|