author | kelvzhu |
Tue, 27 Jul 2010 13:00:43 +0800 | |
changeset 621 | 96fee2635b19 |
parent 588 | c7c26511138f |
child 628 | 7c4a911dc066 |
permissions | -rw-r--r-- |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
2 |
<!-- |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
3 |
============================================================================ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
4 |
Name : ats.ant.xml |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
5 |
Part of : Helium |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
6 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
8 |
All rights reserved. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
9 |
This component and the accompanying materials are made available |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
10 |
under the terms of the License "Eclipse Public License v1.0" |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
11 |
which accompanies this distribution, and is available |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html". |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
13 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
14 |
Initial Contributors: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
15 |
Nokia Corporation - initial contribution. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
16 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
17 |
Contributors: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
18 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
19 |
Description: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
20 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
21 |
============================================================================ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
22 |
--> |
217 | 23 |
<!--* @package testing --> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
24 |
<project name="_testing.ats" xmlns:hlm="http://www.nokia.com/helium"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
25 |
<description> |
217 | 26 |
ATS testing targets. |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
27 |
</description> |
217 | 28 |
|
29 |
<!--* @property enabled.ats |
|
30 |
Value must be set to execute ats-test target. |
|
31 |
@type boolean |
|
32 |
@editable required |
|
33 |
@scope public |
|
34 |
--> |
|
35 |
||
36 |
<!--* @property enabled.aste |
|
37 |
Value must be set to execute ats-aste target. |
|
38 |
@type boolean |
|
39 |
@editable required |
|
40 |
@scope public |
|
41 |
--> |
|
42 |
||
43 |
<!--* @property ats.product.name |
|
44 |
Name of the product to be tested. For example: "PRODUCT" |
|
45 |
@type string |
|
46 |
@editable required |
|
47 |
@scope public |
|
48 |
--> |
|
49 |
||
50 |
<!--* @property ats.drop.location |
|
51 |
Server location (UNC path) to save the ATS3Drop file, before sending to the ATS. For example: \\trwsem00\some_folder\. In case, ``ats.script.type`` is set to "import", ATS doesn't need to have access to ats.drop.location, its value can be any local folder on build machine, for example c:\temp (no network share needed). |
|
52 |
@type string |
|
53 |
@editable required |
|
54 |
@scope public |
|
55 |
--> |
|
56 |
||
57 |
<!--* @property ats.server |
|
58 |
For example: "4fio00105" or "catstresrv001.cats.noklab.net:80". Default server port is "8080", but it is not allowed between intra and Noklab. Because of this we need to define server port as 80. The host can be different depending on site and/or product. |
|
59 |
@type string |
|
60 |
@editable required |
|
61 |
@scope public |
|
62 |
--> |
|
63 |
||
64 |
<!--* @property ats.password |
|
65 |
Password for ATS. This password might be different from NOE or HTTP/UNIX password. |
|
66 |
@type string |
|
67 |
@editable required |
|
68 |
@scope public |
|
69 |
--> |
|
70 |
||
71 |
<!--* @property ats.username |
|
72 |
Username for ATS server. This is NOT the NOE or HTTP/UNIX username. |
|
73 |
@type string |
|
74 |
@editable required |
|
75 |
@scope public |
|
76 |
--> |
|
77 |
||
588 | 78 |
<!--* @property ats.create.singledrop.file |
79 |
defined as true if single drop file is required. Define as false or not present for multiple drop files. |
|
80 |
@type boolean |
|
81 |
@editable required |
|
82 |
@scope public |
|
83 |
--> |
|
217 | 84 |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
85 |
<!-- --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
86 |
<fileset id="reference.ats.flash.images" dir="${release.images.dir}"> |
217 | 87 |
<include name="**/*.fpsx" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
88 |
<include name="**/*rnd.C00" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
89 |
<include name="**/*rnd.V01" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
90 |
</fileset> |
179 | 91 |
|
587 | 92 |
<!--* @property ats.flashfiles.minlimit |
93 |
Limit of minimum number of flash files to execute ats-test target, otherwise ATSDrop.zip will not be generated. Default value is "2" files. |
|
217 | 94 |
@type string |
95 |
@scope public |
|
96 |
--> |
|
587 | 97 |
<condition property="ats.flashfiles.minlimit" value="0" else="2"> |
98 |
<istrue value="${ats.emulator.enable}" /> |
|
99 |
</condition> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
100 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
101 |
<fileset id="reference.ats.sis.images" dir="${ats.sis.images.dir}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
102 |
<include name="**/*.sis" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
103 |
</fileset> |
217 | 104 |
<!-- Limit of minimum number of sis files to execute matti-test target, otherwise MATTI-drop.zip will not be generated. Default value is "1" files. |
105 |
@type string |
|
106 |
@scope public |
|
107 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
108 |
<property name="ats.sisfiles.minlimit" value="1" /> |
179 | 109 |
|
110 |
<var name="drop.file.counter" value="0" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
111 |
|
587 | 112 |
<condition property="internal.enabled.ats"> |
113 |
<istrue value="${enabled.ats}" /> |
|
114 |
</condition> |
|
217 | 115 |
|
587 | 116 |
<!-- The target creates ATSDrop.zip file which also includes test.xml file; and sends the drop to ATS. |
588 | 117 |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
118 |
The layer definition, in system definition file, for tsrc directory should look like: |
588 | 119 |
|
120 |
<layer name="name_test_layer"> |
|
121 |
<module name="module_name"> |
|
122 |
<unit id="unit_id" name="unti_name" bldFile="path_of_tsrc_folder_to_be_built" filter=""/> |
|
123 |
</module> |
|
124 |
</layer> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
125 |
--> |
587 | 126 |
<target name="ats-test" if="internal.enabled.ats"> |
179 | 127 |
<mkdir dir="${test.log.dir}"/> |
128 |
<hlm:filterRecordStartMacro pattern="${ats.password}" category="ats"/> |
|
129 |
<trycatch property="exception" reference="exception"> |
|
130 |
<try> |
|
131 |
<runtarget target="ats-delta"/> |
|
132 |
<antcall target="create-canonical-sysdef-file" inheritRefs="true"> |
|
133 |
<reference refid="ats.system.definition.files" torefid="system.definition.files" /> |
|
134 |
</antcall> |
|
135 |
<runtarget target="copy-mon-sym" /> |
|
136 |
<runtarget target="ats-create-drop" /> |
|
137 |
</try> |
|
138 |
<catch> |
|
139 |
<if> |
|
140 |
<istrue value="${ats.delta.enabled}" /> |
|
141 |
<then> |
|
142 |
<echo message="${exception}"/> |
|
143 |
</then> |
|
144 |
<else> |
|
145 |
<throw refid="exception"/> |
|
146 |
</else> |
|
147 |
</if> |
|
148 |
</catch> |
|
149 |
</trycatch> |
|
150 |
<hlm:filterRecordStopMacro log="${test.log.dir}/${build.id}_ats.log" append="false"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
151 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
152 |
<hlm:textmetadatainput> |
179 | 153 |
<fileset casesensitive="false" file="${test.log.dir}/${build.id}_ats.log" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
154 |
<metadatafilterset refid="filterset.ats" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
155 |
</hlm:textmetadatainput> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
156 |
</hlm:metadatarecord> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
157 |
<hlm:generateBuildStatus file="${build.id}_ats.log" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
158 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
159 |
|
179 | 160 |
<!-- The target creates the ATSdrop.zip file including test.xml for ATS ASTE tests. This target is executable.--> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
161 |
<target name="ats-aste" if="enabled.aste"> |
179 | 162 |
<mkdir dir="${test.log.dir}"/> |
163 |
<hlm:filterRecordStartMacro pattern="${ats.password}" category="ats"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
164 |
<runtarget target="do-ats-aste" /> |
179 | 165 |
<hlm:filterRecordStopMacro log="${test.log.dir}/${build.id}_aste.log" append="false"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
166 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
167 |
<hlm:textmetadatainput> |
179 | 168 |
<fileset casesensitive="false" file="${test.log.dir}/${build.id}_aste.log" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
169 |
<metadatafilterset refid="filterset.aste" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
170 |
</hlm:textmetadatainput> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
171 |
</hlm:metadatarecord> |
179 | 172 |
<hlm:generateBuildStatus file="${build.id}_aste.log" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
173 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
174 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
175 |
<!-- The target creates the MATTI_drop.zip file including test.xml for MATTI tests. This target is executable.--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
176 |
<target name="matti-test" if="enabled.matti"> |
179 | 177 |
<mkdir dir="${test.log.dir}"/> |
178 |
<hlm:filterRecordStartMacro pattern="${ats.password}" category="ats"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
179 |
<runtarget target="do-ats-matti" /> |
179 | 180 |
<hlm:filterRecordStopMacro log="${test.log.dir}/${build.id}_matti.log" append="false"/> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
181 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
182 |
<hlm:textmetadatainput> |
179 | 183 |
<fileset casesensitive="false" file="${test.log.dir}/${build.id}_matti.log" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
184 |
<metadatafilterset refid="filterset.matti" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
185 |
</hlm:textmetadatainput> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
186 |
</hlm:metadatarecord> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
187 |
<hlm:generateBuildStatus file="${build.id}_matti.log" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
188 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
189 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
190 |
<!-- Sends drop file to ATS/ASTE. Please see `ats-test` for description. --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
191 |
<target name="do-ats-test" depends="ats-username, ats-password" unless="skip.ats.sending"> |
179 | 192 |
<property name="ats.sending" value="true" /> |
193 |
<!-- Make the drop file visible to ATS. --> |
|
194 |
||
195 |
<var name="ats.drop.location.file" unset="true"/> |
|
196 |
<if> |
|
197 |
<isset property="ats.drop.location" /> |
|
198 |
<then> |
|
199 |
<mkdir dir="${ats.drop.location}" /> |
|
200 |
<property name="ats.drop.location.file" location="${ats.drop.location}/${ats.drop.file}" /> |
|
201 |
<copy file="${build.output.dir}/ats/${ats.drop.file}" tofile="${ats.drop.location.file}" /> |
|
202 |
</then> |
|
203 |
<else> |
|
204 |
<property name="ats.drop.location.file" location="${build.output.dir}/ats/${ats.drop.file}" /> |
|
205 |
</else> |
|
206 |
</if> |
|
207 |
||
588 | 208 |
<trycatch property="exception"> |
209 |
<try> |
|
210 |
<!-- Notify ATS about the drop. --> |
|
211 |
<if> |
|
212 |
<istrue value="${ats4.enabled}" /> |
|
213 |
<then> |
|
214 |
<hlm:python failonerror="true"> |
|
179 | 215 |
version = r'${java.version}' |
216 |
if '1.6.0' in version: |
|
217 |
assert int(version.split('_')[1]) > 6, 'Java 6 u7 required' |
|
588 | 218 |
</hlm:python> |
219 |
<condition property="ats.import.arg" value="-import" else=""> |
|
220 |
<equals arg1="${ats.script.type}" arg2="import" /> |
|
221 |
</condition> |
|
222 |
<condition property="ats4.libs" value="${helium.dir}/extensions/nokia/external/ats4" else="${helium.dir}/external/antlibs"> |
|
223 |
<available type="dir" file="${helium.dir}/extensions/nokia/external/ats4"/> |
|
224 |
</condition> |
|
225 |
<java classname="com.nokia.ats.util.server.CommandLineClient" fork="true" maxmemory="1024m" failonerror="true"> |
|
587 | 226 |
<classpath> |
227 |
<pathelement path="${java.class.path}"/> |
|
588 | 228 |
<fileset dir="${ats4.libs}" includes="*.jar"/> |
587 | 229 |
</classpath> |
588 | 230 |
<arg line="-url http://${ats.server}/ServerService -path ${ats.drop.location.file} ${ats.import.arg}"/> |
587 | 231 |
</java> |
232 |
</then> |
|
233 |
<else> |
|
588 | 234 |
<if> |
235 |
<and> |
|
236 |
<equals arg1="${ats.script.type}" arg2="import" /> |
|
237 |
<available classname="com.nokia.taitei.util.TestDropImporter"/> |
|
238 |
<not> |
|
239 |
<istrue value="${ats.disable.java.importer}" /> |
|
240 |
</not> |
|
241 |
</and> |
|
242 |
<then> |
|
243 |
<java classname="com.nokia.taitei.util.TestDropImporter" fork="true" maxmemory="1024m" failonerror="true"> |
|
244 |
<classpath> |
|
245 |
<pathelement path="${java.class.path}"/> |
|
246 |
</classpath> |
|
247 |
<arg line="${ats.server} ${ats.drop.location.file} ${ats.username} ${ats.password}"/> |
|
248 |
</java> |
|
249 |
</then> |
|
250 |
<else> |
|
251 |
<condition property="ats.wsh.testrun.file" value="wshTestRunImport.vbs" else="wshTestRunX.vbs"> |
|
252 |
<equals arg1="${ats.script.type}" arg2="import" /> |
|
253 |
</condition> |
|
254 |
<exec executable="cscript" dir="${build.drive}/" failonerror="true"> |
|
255 |
<env key="ats3.username" value="${ats.username}" /> |
|
256 |
<env key="ats3.password" value="${ats.password}" /> |
|
257 |
<env key="ats3.host" value="${ats.server}" /> |
|
258 |
<env key="ats3.pathToDrop" value="${ats.drop.location.file}"/> |
|
259 |
<arg value="${helium.dir}/tools/testing/ats/${ats.wsh.testrun.file}" /> |
|
260 |
</exec> |
|
261 |
</else> |
|
262 |
</if> |
|
587 | 263 |
</else> |
588 | 264 |
</if> |
265 |
</try> |
|
266 |
<catch> |
|
267 |
<echo message="Error: ${exception}"/> |
|
268 |
</catch> |
|
269 |
</trycatch> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
270 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
271 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
272 |
<!-- The target is dependent on "ats-test", should not be called independently. The target fetches flash files location --> |
587 | 273 |
<target name="ats-set-flash-image-path" unless="ats.emulator.enable"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
274 |
<pathconvert pathsep="," property="ats.flash.images"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
275 |
<fileset refid="reference.ats.flash.images"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
276 |
</pathconvert> |
587 | 277 |
<script language="jython" setbeans="false"> |
278 |
if project.getProperty('ats.disable.iconfig') == None: |
|
279 |
import atsant |
|
280 |
ic = None |
|
281 |
try: |
|
588 | 282 |
ic = atsant.IConfigATS(project.getProperty('release.images.dir'), project.getProperty('ats.product.name')) |
587 | 283 |
except Exception, ex: |
284 |
print ex |
|
285 |
if ic: |
|
286 |
project.setProperty('ats.flash.images', ic.findimages()) |
|
287 |
</script> |
|
179 | 288 |
<hlm:python failonerror="true"> |
289 |
<![CDATA[ |
|
290 |
flashfilescount = len(r'${ats.flash.images}'.split(',')) |
|
291 |
mincount = int(r'${ats.flashfiles.minlimit}') |
|
588 | 292 |
if mincount > 0: |
293 |
assert r'${ats.flash.images}' != '', 'No images found in ' + r'${release.images.dir}' |
|
179 | 294 |
if flashfilescount < mincount: |
217 | 295 |
raise Exception('Not enough flash files, check reference.ats.flash.images and build.id, found: ' + r'${ats.flash.images}' + ', looking in: ' + r'${release.images.dir}') |
179 | 296 |
]]> |
297 |
</hlm:python> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
298 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
299 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
300 |
<!-- The target is dependent on "ats-test", should not be called independently. The target fetches flash files location --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
301 |
<target name="ats-set-sis-flash-image-path"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
302 |
<pathconvert pathsep="," property="ats.sis.images"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
303 |
<fileset refid="reference.ats.sis.images"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
304 |
</pathconvert> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
305 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
306 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
307 |
<!-- Sets values common for ATS, this is a dependent target and shouldn't be used as an individual target --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
308 |
<target name="ats-common"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
309 |
<property name="ats.config.file" value="" /> |
217 | 310 |
<property name="ats.specific.pkg" value="" /> |
179 | 311 |
<property name="ats4.enabled" value="False" /> |
217 | 312 |
<!-- Product HardWare ID (HWID) attached to ATS. By default the value of HWID is not set. |
313 |
@type string |
|
314 |
@scope public |
|
315 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
316 |
<property name="ats.product.hwid" value="" /> |
217 | 317 |
<!-- To set test commands execution time limit on ATS3 server, in seconds. Default value is "60". |
318 |
@type string |
|
319 |
@scope public |
|
320 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
321 |
<property name="ats.test.timeout" value="60" /> |
217 | 322 |
<!-- Sets ATS reports store location. Default location is "${publish.dir}/${publish.subdir}" |
323 |
@type string |
|
324 |
@scope public |
|
325 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
326 |
<property name="ats.report.location" value="${publish.dir}/${publish.subdir}" /> |
179 | 327 |
<condition property="internal.ats.diamonds.arg" value="--diamonds-build-url=http://${diamonds.host}${diamonds.build.id}" else=""> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
328 |
<isset property="diamonds.build.url" /> |
179 | 329 |
</condition> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
330 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
331 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
332 |
<!-- Sets default values for the ATS (STIF and EUnit), this is a dependent target and shouldn't be used as an individual target --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
333 |
<target name="ats-set-defaults-stifeunit" depends="ats-common,lookup-email"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
334 |
<!-- Default values for the properties --> |
217 | 335 |
<!-- The property is needed if you want to get an email from ATS server after the tests are executed. There can be one to many semicolon(s) ";" separated email addresses. |
336 |
@type string |
|
337 |
@scope public |
|
338 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
339 |
<property name="ats.email.list" value="${email.from}" /> |
588 | 340 |
<!-- Value of the ats email report |
341 |
@type string |
|
342 |
@scope public |
|
343 |
--> |
|
344 |
<property name="ats.report.type" value="ATS3_REPORT" /> |
|
217 | 345 |
<!-- The default value is "data" and refers to the 'data' directory under 'tsrc' directory. |
346 |
@type string |
|
347 |
@scope public |
|
348 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
349 |
<property name="tsrc.data.dir" value="data" /> |
217 | 350 |
<!-- Modify the plan name if you have understanding of test.xml file or leave it as it is. Default value is "plan" |
351 |
@type string |
|
352 |
@scope public |
|
353 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
354 |
<property name="ats.plan.name" value="plan" /> |
217 | 355 |
<!-- Modify the test-run name if you have understanding of test.xml file or leave it as it is. Default value is a string consist of build id, product name, major and minor versions |
356 |
@type string |
|
357 |
@scope public |
|
358 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
359 |
<property name="ats.testrun.name" value="${build.id}_${ats.product.name}" /> |
217 | 360 |
<!-- CTC host, provided by CATS used to create coverage measurement reports. MON.sym files are copied to this location, for example "10.0.0.1". If not given, code coverage reports are not created |
361 |
@type string |
|
362 |
@scope public |
|
363 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
364 |
<property name="ats.ctc.host" value="" /> |
179 | 365 |
<condition property="ats.version" value="4" else="3"> |
366 |
<istrue value="${ats4.enabled}" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
367 |
</condition> |
179 | 368 |
<var name="ats.drop.file" value="ATS${ats.version}Drop${drop.file.counter}.zip" /> |
369 |
||
587 | 370 |
<!--* @property ats.target.platform |
371 |
Sets target platform for compiling test components. Default value is "armv5 urel". |
|
217 | 372 |
@type string |
373 |
@scope public |
|
374 |
--> |
|
587 | 375 |
<condition property="ats.target.platform" value="winscw urel" else="armv5 urel"> |
376 |
<istrue value="${ats.emulator.enable}" /> |
|
377 |
</condition> |
|
217 | 378 |
<!-- Should be "True" if tracing is needed during the tests running on ATS3. Default value is "False", the values are case-sensitive. |
379 |
@type string |
|
380 |
@scope public |
|
381 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
382 |
<property name="ats.trace.enabled" value="False" /> |
217 | 383 |
<!-- Should be "True" if coverage measurement and dynamic analysis (CTC) tool support is to be used by ATS. Default value is "False", the values are case-sensitive. |
384 |
@type string |
|
385 |
@scope public |
|
386 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
387 |
<property name="ats.ctc.enabled" value="False" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
388 |
<property name="ats.multiset.enabled" value="False" /> |
217 | 389 |
<!-- Flags for EUnit exerunner can be set by setting the value of this variable. The default flags are set to "/E S60AppEnv /R Off". |
390 |
@type string |
|
391 |
@scope public |
|
392 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
393 |
<property name="eunitexerunner.flags" value="/E S60AppEnv /R Off" /> |
217 | 394 |
<!-- If the property is set to "True", then the only test components which will have PKG files, will be included into the test.xml as a test-set. Which means, even if there's a test component (executable) but there's no PKG file, it should not be considered as a test component and hence not included into the test.xml as a separate test. By default the property value is False. |
395 |
@type string |
|
396 |
@scope public |
|
397 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
398 |
<property name="ats.obey.pkgfiles.rule" value="False" /> |
587 | 399 |
<fail unless="ats.product.name" message="ats.product.name property not defined" /> |
400 |
<condition property="ats.hti" value="false" else="true"> |
|
401 |
<istrue value="${ats.emulator.enable}" /> |
|
402 |
</condition> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
403 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
404 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
405 |
<!-- Sets default values for the ASTE, this is a dependent target and shouldn't be used as an individual target --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
406 |
<target name="ats-set-defaults-aste" depends="ats-common"> |
179 | 407 |
<var name="ats.drop.file" value="ATSAsteDrop.zip" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
408 |
<property name="ats.aste.test.type" value="smoke" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
409 |
<property name="ats.aste.testasset.caseids" value="100,101,102,103,105,106,107,108,109,110,111,112,113,114,115" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
410 |
<property name="ats.aste.software.version" value="${build.id}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
411 |
<property name="ats.aste.language" value="English" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
412 |
<property name="ats.aste.software.release" value="${build.name}" /> |
217 | 413 |
<!-- Modify the plan name if you have understanding of test.xml file or leave it as it is. Default value is "plan" |
414 |
@type string |
|
415 |
@scope public |
|
416 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
417 |
<property name="ats.aste.plan.name" value="plan" /> |
217 | 418 |
<!-- Modify the test-run name if you have understanding of test.xml file or leave it as it is. Default value is a string consist of build id, product name, major and minor versions |
419 |
@type string |
|
420 |
@scope public |
|
421 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
422 |
<property name="ats.aste.testrun.name" value="${build.id}_${ats.product.name}_${major.version}.${minor.version}" /> |
217 | 423 |
<!-- The property is needed if you want to get an email from ATS server after the tests are executed. There can be one to many semicolon(s) ";" separated email addresses. |
424 |
@type string |
|
425 |
@scope public |
|
426 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
427 |
<property name="ats.aste.email.list" value="" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
428 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
429 |
|
588 | 430 |
<!-- This macro fetches the tsrc paths from system definition file (layers.sysdef.xml). |
431 |
||
432 |
The layer defintion should look like: |
|
433 |
||
434 |
<layer name="name_test_layer"> |
|
435 |
<module name="module_name"> |
|
436 |
<unit id="unit_id" name="unti_name" bldFile="path_of_tsrc_folder_to_be_built" filter="" /> |
|
437 |
</module> |
|
438 |
</layer> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
439 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
440 |
<scriptdef name="getModuleTsrcMacro" language="jython" uri="http://www.nokia.com/helium"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
441 |
<attribute name="property" /> |
179 | 442 |
<attribute name="prefix"/> |
443 |
import traceback |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
444 |
import os |
179 | 445 |
import atsant |
446 |
from com.nokia.ant.util import Helper |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
447 |
|
179 | 448 |
canonicalsysdeffile = Helper.getProperty(project, 'canonical.sysdef.file') |
588 | 449 |
createsingledropfile = project.getProperty('ats.create.singledrop.file') |
450 |
modules = atsant.files_to_test(canonicalsysdeffile, project.getProperty('exclude.test.layers'), project.getProperty('ido.build.filter'), project.getProperty('build.drive'), createsingledropfile) |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
451 |
|
179 | 452 |
for name in modules.keys(): |
453 |
if modules[name] == []: |
|
454 |
del modules[name] |
|
455 |
else: |
|
456 |
project.setProperty("%s.%s" % (attributes.get('prefix'), name), " ".join(modules[name])) |
|
457 |
||
458 |
project.setProperty(attributes.get('property'), ",".join(modules.keys())) |
|
459 |
project.setProperty('ats.drops.count', str(len(modules))) |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
460 |
</scriptdef> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
461 |
|
179 | 462 |
<!-- The target is dependent on "ats-test", should not be called individually. The target creates the ATSdrop.zip file including test:xml file --> |
587 | 463 |
<target name="ats-create-drop" depends="ats-set-flash-image-path,ats-emulator-zip"> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
464 |
<mkdir dir="${build.output.dir}/ats" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
465 |
<hlm:getModuleTsrcMacro property="module.list" prefix="module.tsrc" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
466 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
467 |
<scriptcondition language="beanshell"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
468 |
<![CDATA[ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
469 |
String value = project.getProperty("module.list"); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
470 |
if (value != null) { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
471 |
String[] out = value.split(","); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
472 |
if ((out == null) || (out.length == 0) || ((out.length == 1) && (out[0].length()==0))) { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
473 |
self.setValue(true); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
474 |
} else { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
475 |
self.setValue(false); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
476 |
} |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
477 |
} else { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
478 |
self.log("Error: module.list not defined."); |
179 | 479 |
self.setValue(true); |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
480 |
} |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
481 |
]]> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
482 |
</scriptcondition> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
483 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
484 |
<echo message="Error: No test modules found!" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
485 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
486 |
<else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
487 |
<for list="${module.list}" delimiter="," param="module"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
488 |
<sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
489 |
<runtarget target="ats-set-defaults-stifeunit" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
490 |
<echo>${ats.drop.file}</echo> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
491 |
<exec executable="python"> |
217 | 492 |
<arg line="-m ats3.__init__" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
493 |
<arg value="--device-type=${ats.product.name}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
494 |
<arg value="--device-hwid=${ats.product.hwid}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
495 |
<arg value="${internal.ats.diamonds.arg}" /> |
179 | 496 |
<arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
497 |
<arg value="--report-email=${ats.email.list}" /> |
588 | 498 |
<arg value="--report-type=${ats.report.type}" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
499 |
<arg value="--plan-name=${ats.plan.name}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
500 |
<arg value="--testrun-name=${ats.testrun.name}_@{module}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
501 |
<arg value="--flash-images=${ats.flash.images}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
502 |
<arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
503 |
<arg value="--target-platform=${ats.target.platform}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
504 |
<arg value="--data-dir=${tsrc.data.dir}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
505 |
<arg value="--test-timeout=${ats.test.timeout}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
506 |
<arg value="--build-drive=${build.drive}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
507 |
<arg value="--trace-enabled=${ats.trace.enabled}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
508 |
<arg value="--ctc-enabled=${ats.ctc.enabled}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
509 |
<arg value="--multiset-enabled=${ats.multiset.enabled}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
510 |
<arg value="--file-store=${ats.report.location}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
511 |
<arg value="--eunitexerunner-flags=${eunitexerunner.flags}" /> |
179 | 512 |
<arg value="--ctc-run-process-params=${ats.ctc.host}#${ats.drop.file}#${ats.drops.count}" /> <!-- Three differnt value are combined with '#' character which is later parsed inside the script --> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
513 |
<arg value="--monsym-files=${ats.ctc.monsyms}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
514 |
<arg value="--config=${ats.config.file}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
515 |
<arg value="--obey-pkgfiles=${ats.obey.pkgfiles.rule}" /> |
179 | 516 |
<arg value="--ats4-enabled=${ats4.enabled}" /> |
217 | 517 |
<arg value="--specific-pkg=${ats.specific.pkg}" /> |
587 | 518 |
<arg value="--hti=${ats.hti}" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
519 |
<arg value="--verbose" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
520 |
<arg line="${module.tsrc.@{module}}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
521 |
</exec> |
588 | 522 |
<antcall target="do-ats-test" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
523 |
<math result="drop.file.counter" operand1="1" operation="+" operand2="${drop.file.counter}" datatype="int" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
524 |
</sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
525 |
</for> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
526 |
</else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
527 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
528 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
529 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
530 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
531 |
<!-- Please see ats-aste for description.--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
532 |
<target name="do-ats-aste" depends="ats-set-flash-image-path, ats-set-defaults-aste" if="enabled.aste"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
533 |
<mkdir dir="${build.output.dir}/ats" /> |
179 | 534 |
<exec executable="python"> |
217 | 535 |
<arg line="-m ats3.aste" /> |
179 | 536 |
<arg value="--report-email=${ats.aste.email.list}" /> |
537 |
<arg value="--device-type=${ats.product.name}" /> |
|
538 |
<arg value="--flash-images=${ats.flash.images}" /> |
|
539 |
<arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" /> |
|
540 |
<arg value="--plan-name=${ats.aste.plan.name}" /> |
|
541 |
<arg value="--testrun-name=${ats.aste.testrun.name}" /> |
|
542 |
<arg value="--device-hwid=${ats.product.hwid}" /> |
|
543 |
<arg value="--test-timeout=${ats.test.timeout}" /> |
|
544 |
<arg value="--build-drive=${build.drive}" /> |
|
545 |
<arg value="${internal.ats.diamonds.arg}" /> |
|
546 |
<arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" /> |
|
547 |
<arg value="--test-type=${ats.aste.test.type}" /> |
|
548 |
<arg value="--testasset-location=${ats.aste.testasset.location}" /> |
|
549 |
<arg value="--testasset-caseids=${ats.aste.testasset.caseids}" /> |
|
550 |
<arg value="--software-version=${ats.aste.software.version}" /> |
|
551 |
<arg value="--device-language=${ats.aste.language}" /> |
|
552 |
<arg value="--software-release=${ats.aste.software.release}" /> |
|
553 |
<arg value="--ats4-enabled=${ats4.enabled}" /> |
|
554 |
<arg value="--verbose" /> |
|
555 |
</exec> |
|
556 |
<runtarget target="do-ats-test" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
557 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
558 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
559 |
<!-- |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
560 |
This target search the mon.sym files using unit information from the canonical sysdef file. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
561 |
Then it copies the discovered files under the ftp server defined by ats.ctc.host. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
562 |
The target url is: ftp ://[server]/ctc_helium/[diamonds_id]/mon_syms/[id]/mon.sym |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
563 |
--> |
179 | 564 |
<target name="copy-mon-sym"> |
565 |
<if> |
|
566 |
<istrue value="${ats.ctc.enabled}"/> |
|
567 |
<then> |
|
568 |
<fmpp sourceFile="${helium.dir}/tools/testing/ats/templates/monsym-file-list.txt.ftl" |
|
569 |
outputFile="${temp.build.dir}/monsym-file-list.txt"> |
|
570 |
<data expandProperties="yes"> |
|
571 |
data: xml(${canonical.sysdef.file}) |
|
572 |
ant: antProperties() |
|
573 |
</data> |
|
574 |
</fmpp> |
|
575 |
<hlm:path2file reference="mon.sym.list" file="${temp.build.dir}/monsym-file-list.txt" /> |
|
576 |
<script language="jython"> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
577 |
import os |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
578 |
import ctc |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
579 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
580 |
if not project.getProperty('ats.ctc.host'): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
581 |
raise Exception('ats.ctc.host property is not defined.') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
582 |
if not project.getProperty('diamonds.build.id'): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
583 |
raise Exception('diamonds.build.id property is not defined.') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
584 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
585 |
server = project.getProperty('ats.ctc.host') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
586 |
diamondsid = os.path.basename(os.path.dirname(project.getProperty('diamonds.build.id'))) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
587 |
path = project.getReference('mon.sym.list') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
588 |
if not path: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
589 |
raise Exception('mon.sym.list reference has not been set') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
590 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
591 |
uploader = ctc.MonSymFTPUploader(server, path.list(), diamondsid) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
592 |
monsyms = uploader.upload() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
593 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
594 |
# Using ; to separate the path because the target script is running on windows |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
595 |
project.setNewProperty('ats.ctc.monsyms', ';'.join([ "//%s/%s" % (server, x) for x in monsyms])) |
179 | 596 |
</script> |
597 |
<echo>ats.ctc.monsyms: ${ats.ctc.monsyms}</echo> |
|
598 |
</then> |
|
599 |
</if> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
600 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
601 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
602 |
<!-- a dependant target please do not call directly use matti-test, |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
603 |
target calls the MATTI script that creates the MATTI_drop.zip file and runs the tests |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
604 |
listed in test.rb. ats-set-flash-image-path and ats-set-sis-flash-image-path look for lists of files--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
605 |
<target name="do-ats-matti" depends="ats-set-flash-image-path, ats-set-sis-flash-image-path" > |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
606 |
<runtarget target="ats-set-defaults-stifeunit" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
607 |
<!--need to set theseup for use by do-ats-test target--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
608 |
<mkdir dir="${build.output.dir}/ats" /> |
179 | 609 |
<var name="ats.drop.file" value="ATSMattiDrop.zip" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
610 |
<if> |
179 | 611 |
<!-- get the list of .sis files in the defined folder to pass as a list to the python script--> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
612 |
<scriptcondition language="beanshell"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
613 |
<![CDATA[ |
179 | 614 |
String sisfiles = project.getProperty("ats.sis.images"); |
615 |
String value = project.getProperty("ats.sisfiles.minlimit"); |
|
616 |
if (sisfiles != null && value != null) { |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
617 |
int cond = Integer.valueOf(value).intValue(); |
179 | 618 |
String[] out = sisfiles.split(","); |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
619 |
if (out.length < cond ) { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
620 |
self.setValue(true); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
621 |
} else { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
622 |
self.setValue(false); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
623 |
} |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
624 |
} else { |
179 | 625 |
self.log("Error: reference.ats.sis.images not defined."); |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
626 |
self.setValue(true); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
627 |
} |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
628 |
]]> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
629 |
</scriptcondition> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
630 |
<then> |
179 | 631 |
<echo message="Error: Not enough sis files check reference.ats.sis.images" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
632 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
633 |
<else> |
179 | 634 |
<!-- execute the MattiDrops.py script with parameters--> |
635 |
<exec executable="python" resultproperty="script.response"> |
|
217 | 636 |
<arg line="-m ats3.matti.MattiDrops" /> |
179 | 637 |
<arg value="--build-drive=${build.drive}" /> |
638 |
<arg value="--matti-scripts=${matti.scripts}" /> |
|
639 |
<arg value="--flash-images=${ats.flash.images}" /> |
|
640 |
<arg value="--harness=STIF" /> |
|
641 |
<arg value="--file-store=${ats.output.dir}" /> |
|
642 |
<arg value="--testrun-name=${ats.testrun.name}" /> |
|
643 |
<arg value="--device-type=${ats.product.name}" /> |
|
644 |
<arg value="--device-hwid=${ats.product.hwid}" /> |
|
645 |
<arg value="--diamonds-build-url=${internal.ats.diamonds.arg}" /> |
|
646 |
<arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" /> |
|
647 |
<arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" /> |
|
648 |
<arg value="--plan-name=${ats.plan.name}" /> |
|
649 |
<arg value="--sis-files=${ats.sis.images}" /> |
|
650 |
<arg value="--template-loc=${template.file}" /> |
|
651 |
</exec> |
|
652 |
<if> |
|
653 |
<not> |
|
654 |
<!-- if the response is not 0 then need to create the skip.ats.sending |
|
655 |
flag so that do-ats-test is not run--> |
|
656 |
<equals arg1="${script.response}" arg2="0" /> |
|
657 |
</not> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
658 |
<then> |
217 | 659 |
<!-- Skips sending drop package file to ATS/ASTE after its creation. |
660 |
@type boolean |
|
661 |
@scope public |
|
662 |
--> |
|
179 | 663 |
<property name="skip.ats.sending" value="1" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
664 |
</then> |
179 | 665 |
</if> |
666 |
<runtarget target="do-ats-test" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
667 |
</else> |
179 | 668 |
</if> |
669 |
</target> |
|
670 |
||
217 | 671 |
<!-- Temp dir |
672 |
@type string |
|
673 |
@scope private |
|
674 |
--> |
|
179 | 675 |
<property name="ats.evalid.pre" value="${temp.build.dir}/${build.id}_atsevalidpre" /> |
217 | 676 |
<!-- Temp dir |
677 |
@type string |
|
678 |
@scope private |
|
679 |
--> |
|
179 | 680 |
<property name="ats.evalid.post" value="${temp.build.dir}/${build.id}_atsevalidpost" /> |
681 |
||
682 |
<!-- Call before preperation --> |
|
683 |
<target name="find-files-pre" if="ats.delta.enabled"> |
|
684 |
<hlm:evalidMacro dir="${ats.evalid.pre}"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
685 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
686 |
|
179 | 687 |
<!-- Call after preperation --> |
688 |
<target name="find-files-post" if="ats.delta.enabled"> |
|
689 |
<hlm:evalidMacro dir="${ats.evalid.post}"/> |
|
690 |
</target> |
|
691 |
||
692 |
<!-- Run evalid on ido directories --> |
|
693 |
<macrodef name="evalidMacro" uri="http://www.nokia.com/helium"> |
|
694 |
<attribute name="dir"/> |
|
695 |
<sequential> |
|
696 |
<runtarget target="ido-create-ado-mapping"/> |
|
697 |
<hlm:python> |
|
698 |
import delta_zip |
|
699 |
delta_zip.evalidAdomapping(r'${build.drive}', r'@{dir}', r'${ado.mapping.file}') |
|
700 |
</hlm:python> |
|
701 |
</sequential> |
|
702 |
</macrodef> |
|
703 |
||
704 |
<!-- Generate sysdef fileset based on evalid data --> |
|
705 |
<target name="ats-delta" if="ats.delta.enabled"> |
|
706 |
<script language="jython"> |
|
707 |
import ido |
|
708 |
from com.nokia.ant.util import Helper |
|
709 |
import delta_zip |
|
710 |
import os |
|
711 |
||
712 |
atspath = project.createDataType("path") |
|
713 |
i = project.getReference('system.definition.files').iterator() |
|
714 |
changedfiles = delta_zip.changedFiles(Helper.getProperty(project, 'ats.evalid.pre'), Helper.getProperty(project, 'ats.evalid.post')) |
|
715 |
while i.hasNext(): |
|
716 |
path = i.next().toString() |
|
717 |
sysdefpath = os.path.abspath(os.path.join(project.getProperty('build.drive') + os.sep, ido.get_sysdef_location(path))) |
|
718 |
for f in changedfiles: |
|
719 |
if sysdefpath.lower() in os.path.abspath(f).lower(): |
|
720 |
pe = atspath.createPathElement() |
|
721 |
pe.setPath(path) |
|
722 |
break |
|
723 |
project.addReference('ats.system.definition.files', atspath) |
|
724 |
</script> |
|
725 |
</target> |
|
726 |
||
727 |
<!-- Common target to run ats, aste and matti --> |
|
728 |
<target name="run-test" depends="ats-test,ats-aste,matti-test"/> |
|
587 | 729 |
|
730 |
<!-- Zip build area for emulator --> |
|
731 |
<target name="ats-emulator-zip" if="ats.emulator.enable"> |
|
732 |
<property name="zips.emulator_zip.spec.name" value="emulator_zip"/> |
|
588 | 733 |
<hlm:zipContentMacro type="emulator_zip" file="${helium.dir}/tools/testing/ats/emulator_zip.cfg.xml" /> |
587 | 734 |
|
735 |
<if> |
|
736 |
<isset property="ats.drop.location" /> |
|
737 |
<then> |
|
738 |
<property name="ats.flash.images" value="${ats.drop.location}\${build.id}_emulator_urel.zip"/> |
|
739 |
<copy file="${build.output.dir}/ats/${build.id}_emulator_urel.zip" tofile="${ats.flash.images}" /> |
|
740 |
</then> |
|
741 |
<else> |
|
742 |
<property name="ats.flash.images" value="${build.output.dir}/ats/${build.id}_emulator_urel.zip"/> |
|
743 |
</else> |
|
744 |
</if> |
|
745 |
</target> |
|
588 | 746 |
|
747 |
<!-- Generate and upload drop using custom template --> |
|
748 |
<target name="ats-custom-drop"> |
|
749 |
<mkdir dir="${build.output.dir}/ats" /> |
|
750 |
<runtarget target="ats-set-flash-image-path" /> |
|
751 |
<runtarget target="ats-set-defaults-stifeunit" /> |
|
752 |
<property name="ats.custom.template" value="${helium.dir}/tools/testing/ats/templates/ats4_naviengine_template.xml"/> |
|
753 |
<exec executable="python"> |
|
754 |
<arg line="-Wignore -m ats3.custom" /> |
|
755 |
<arg value="--custom-template=${ats.custom.template}" /> |
|
756 |
<arg value="--device-type=${ats.product.name}" /> |
|
757 |
<arg value="${internal.ats.diamonds.arg}" /> |
|
758 |
<arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" /> |
|
759 |
<arg value="--report-email=${ats.email.list}" /> |
|
760 |
<arg value="--testrun-name=${ats.testrun.name}" /> |
|
761 |
<arg value="--flash-images=${ats.flash.images}" /> |
|
762 |
<arg value="--test-timeout=${ats.test.timeout}" /> |
|
763 |
<arg value="--test-type=${ats.custom.test.type}" /> |
|
764 |
</exec> |
|
765 |
<runtarget target="do-ats-test" /> |
|
766 |
</target> |
|
767 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
768 |
</project> |