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