author | Richard Taylor <richard.i.taylor@nokia.com> |
Thu, 18 Mar 2010 15:12:39 +0000 | |
branch | wip |
changeset 381 | 8052c8afe93e |
parent 217 | 0f5e3a7fb6af |
child 587 | 85df38eb4012 |
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 |
||
78 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
79 |
<!-- --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
80 |
<fileset id="reference.ats.flash.images" dir="${release.images.dir}"> |
217 | 81 |
<include name="**/*.fpsx" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
82 |
<include name="**/*rnd.C00" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
83 |
<include name="**/*rnd.V01" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
84 |
</fileset> |
179 | 85 |
|
217 | 86 |
<!-- Limit of minimum number of flash files to execute ats-test target, otherwise ATSDrop.zip will not be generated. Default value is "2" files. |
87 |
@type string |
|
88 |
@scope public |
|
89 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
90 |
<property name="ats.flashfiles.minlimit" value="2" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
91 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
92 |
<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
|
93 |
<include name="**/*.sis" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
94 |
</fileset> |
217 | 95 |
<!-- 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. |
96 |
@type string |
|
97 |
@scope public |
|
98 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
99 |
<property name="ats.sisfiles.minlimit" value="1" /> |
179 | 100 |
|
101 |
<var name="drop.file.counter" value="0" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
102 |
|
217 | 103 |
<!-- The target creates ATSDrop.zip file which also includes test.xml file; and sends the drop to ATS. |
104 |
||
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
105 |
The layer definition, in system definition file, for tsrc directory should look like: |
217 | 106 |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
107 |
<pre> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
108 |
<layer name="name_test_layer"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
109 |
<module name="module_name"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
110 |
<unit id="unit_id" name="unti_name" bldFile="path_of_tsrc_folder_to_be_built" filter=""/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
111 |
</module> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
112 |
</layer> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
113 |
</pre> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
114 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
115 |
<target name="ats-test" if="enabled.ats"> |
179 | 116 |
<mkdir dir="${test.log.dir}"/> |
117 |
<hlm:filterRecordStartMacro pattern="${ats.password}" category="ats"/> |
|
118 |
<trycatch property="exception" reference="exception"> |
|
119 |
<try> |
|
120 |
<runtarget target="ats-delta"/> |
|
121 |
<antcall target="create-canonical-sysdef-file" inheritRefs="true"> |
|
122 |
<reference refid="ats.system.definition.files" torefid="system.definition.files" /> |
|
123 |
</antcall> |
|
124 |
<runtarget target="copy-mon-sym" /> |
|
125 |
<runtarget target="ats-create-drop" /> |
|
126 |
</try> |
|
127 |
<catch> |
|
128 |
<if> |
|
129 |
<istrue value="${ats.delta.enabled}" /> |
|
130 |
<then> |
|
131 |
<echo message="${exception}"/> |
|
132 |
</then> |
|
133 |
<else> |
|
134 |
<throw refid="exception"/> |
|
135 |
</else> |
|
136 |
</if> |
|
137 |
</catch> |
|
138 |
</trycatch> |
|
139 |
<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
|
140 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
141 |
<hlm:textmetadatainput> |
179 | 142 |
<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
|
143 |
<metadatafilterset refid="filterset.ats" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
144 |
</hlm:textmetadatainput> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
145 |
</hlm:metadatarecord> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
146 |
<hlm:generateBuildStatus file="${build.id}_ats.log" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
147 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
148 |
|
179 | 149 |
<!-- 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
|
150 |
<target name="ats-aste" if="enabled.aste"> |
179 | 151 |
<mkdir dir="${test.log.dir}"/> |
152 |
<hlm:filterRecordStartMacro pattern="${ats.password}" category="ats"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
153 |
<runtarget target="do-ats-aste" /> |
179 | 154 |
<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
|
155 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
156 |
<hlm:textmetadatainput> |
179 | 157 |
<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
|
158 |
<metadatafilterset refid="filterset.aste" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
159 |
</hlm:textmetadatainput> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
160 |
</hlm:metadatarecord> |
179 | 161 |
<hlm:generateBuildStatus file="${build.id}_aste.log" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
162 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
163 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
164 |
<!-- 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
|
165 |
<target name="matti-test" if="enabled.matti"> |
179 | 166 |
<mkdir dir="${test.log.dir}"/> |
167 |
<hlm:filterRecordStartMacro pattern="${ats.password}" category="ats"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
168 |
<runtarget target="do-ats-matti" /> |
179 | 169 |
<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
|
170 |
<hlm:metadatarecord database="${metadata.dbfile}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
171 |
<hlm:textmetadatainput> |
179 | 172 |
<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
|
173 |
<metadatafilterset refid="filterset.matti" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
174 |
</hlm:textmetadatainput> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
175 |
</hlm:metadatarecord> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
176 |
<hlm:generateBuildStatus file="${build.id}_matti.log" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
177 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
178 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
179 |
<!-- 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
|
180 |
<target name="do-ats-test" depends="ats-username, ats-password" unless="skip.ats.sending"> |
179 | 181 |
<property name="ats.sending" value="true" /> |
182 |
<!-- Make the drop file visible to ATS. --> |
|
183 |
||
184 |
<var name="ats.drop.location.file" unset="true"/> |
|
185 |
<if> |
|
186 |
<isset property="ats.drop.location" /> |
|
187 |
<then> |
|
188 |
<mkdir dir="${ats.drop.location}" /> |
|
189 |
<property name="ats.drop.location.file" location="${ats.drop.location}/${ats.drop.file}" /> |
|
190 |
<copy file="${build.output.dir}/ats/${ats.drop.file}" tofile="${ats.drop.location.file}" /> |
|
191 |
</then> |
|
192 |
<else> |
|
193 |
<property name="ats.drop.location.file" location="${build.output.dir}/ats/${ats.drop.file}" /> |
|
194 |
</else> |
|
195 |
</if> |
|
196 |
||
197 |
<!-- Notify ATS about the drop. --> |
|
198 |
<if> |
|
199 |
<istrue value="${ats4.enabled}" /> |
|
200 |
<then> |
|
201 |
<hlm:python failonerror="true"> |
|
202 |
version = r'${java.version}' |
|
203 |
if '1.6.0' in version: |
|
204 |
assert int(version.split('_')[1]) > 6, 'Java 6 u7 required' |
|
205 |
</hlm:python> |
|
206 |
<condition property="ats.import.arg" value="-import" else=""> |
|
207 |
<equals arg1="${ats.script.type}" arg2="import" /> |
|
208 |
</condition> |
|
217 | 209 |
<condition property="ats4.libs" value="${helium.dir}/extensions/nokia/external/ats4" else="${helium.dir}/external/antlibs"> |
210 |
<available type="dir" file="${helium.dir}/extensions/nokia/external/ats4"/> |
|
211 |
</condition> |
|
212 |
<java classname="com.nokia.ats.util.server.CommandLineClient" fork="true" maxmemory="512m"> |
|
179 | 213 |
<classpath> |
214 |
<pathelement path="${java.class.path}"/> |
|
217 | 215 |
<fileset dir="${ats4.libs}" includes="*.jar"/> |
179 | 216 |
</classpath> |
217 |
<arg line="-url http://${ats.server}/ServerService -path ${ats.drop.location.file} ${ats.import.arg}"/> |
|
218 |
</java> |
|
219 |
</then> |
|
220 |
<else> |
|
221 |
<condition property="ats.wsh.testrun.file" value="wshTestRunImport.vbs" else="wshTestRunX.vbs"> |
|
222 |
<equals arg1="${ats.script.type}" arg2="import" /> |
|
223 |
</condition> |
|
224 |
<exec executable="cscript" dir="${build.drive}/" failonerror="false"> |
|
225 |
<env key="ats3.username" value="${ats.username}" /> |
|
226 |
<env key="ats3.password" value="${ats.password}" /> |
|
227 |
<env key="ats3.host" value="${ats.server}" /> |
|
228 |
<env key="ats3.pathToDrop" value="${ats.drop.location.file}"/> |
|
229 |
<arg value="${helium.dir}/tools/testing/ats/${ats.wsh.testrun.file}" /> |
|
230 |
</exec> |
|
231 |
</else> |
|
232 |
</if> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
233 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
234 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
235 |
<!-- 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
|
236 |
<target name="ats-set-flash-image-path"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
237 |
<pathconvert pathsep="," property="ats.flash.images"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
238 |
<fileset refid="reference.ats.flash.images"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
239 |
</pathconvert> |
179 | 240 |
<hlm:python failonerror="true"> |
241 |
<![CDATA[ |
|
242 |
flashfilescount = len(r'${ats.flash.images}'.split(',')) |
|
243 |
mincount = int(r'${ats.flashfiles.minlimit}') |
|
244 |
if flashfilescount < mincount: |
|
217 | 245 |
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 | 246 |
]]> |
247 |
</hlm:python> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
248 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
249 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
250 |
<!-- 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
|
251 |
<target name="ats-set-sis-flash-image-path"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
252 |
<pathconvert pathsep="," property="ats.sis.images"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
253 |
<fileset refid="reference.ats.sis.images"/> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
254 |
</pathconvert> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
255 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
256 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
257 |
<!-- 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
|
258 |
<target name="ats-common"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
259 |
<property name="ats.config.file" value="" /> |
217 | 260 |
<property name="ats.specific.pkg" value="" /> |
179 | 261 |
<property name="ats4.enabled" value="False" /> |
217 | 262 |
<!-- Product HardWare ID (HWID) attached to ATS. By default the value of HWID is not set. |
263 |
@type string |
|
264 |
@scope public |
|
265 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
266 |
<property name="ats.product.hwid" value="" /> |
217 | 267 |
<!-- To set test commands execution time limit on ATS3 server, in seconds. Default value is "60". |
268 |
@type string |
|
269 |
@scope public |
|
270 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
271 |
<property name="ats.test.timeout" value="60" /> |
217 | 272 |
<!-- Sets ATS reports store location. Default location is "${publish.dir}/${publish.subdir}" |
273 |
@type string |
|
274 |
@scope public |
|
275 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
276 |
<property name="ats.report.location" value="${publish.dir}/${publish.subdir}" /> |
179 | 277 |
<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
|
278 |
<isset property="diamonds.build.url" /> |
179 | 279 |
</condition> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
280 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
281 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
282 |
<!-- 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
|
283 |
<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
|
284 |
<!-- Default values for the properties --> |
217 | 285 |
<!-- 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. |
286 |
@type string |
|
287 |
@scope public |
|
288 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
289 |
<property name="ats.email.list" value="${email.from}" /> |
217 | 290 |
<!-- The default value is "data" and refers to the 'data' directory under 'tsrc' directory. |
291 |
@type string |
|
292 |
@scope public |
|
293 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
294 |
<property name="tsrc.data.dir" value="data" /> |
217 | 295 |
<!-- Modify the plan name if you have understanding of test.xml file or leave it as it is. Default value is "plan" |
296 |
@type string |
|
297 |
@scope public |
|
298 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
299 |
<property name="ats.plan.name" value="plan" /> |
217 | 300 |
<!-- 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 |
301 |
@type string |
|
302 |
@scope public |
|
303 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
304 |
<property name="ats.testrun.name" value="${build.id}_${ats.product.name}" /> |
217 | 305 |
<!-- 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 |
306 |
@type string |
|
307 |
@scope public |
|
308 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
309 |
<property name="ats.ctc.host" value="" /> |
179 | 310 |
<condition property="ats.version" value="4" else="3"> |
311 |
<istrue value="${ats4.enabled}" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
312 |
</condition> |
179 | 313 |
<var name="ats.drop.file" value="ATS${ats.version}Drop${drop.file.counter}.zip" /> |
314 |
||
217 | 315 |
<!-- Sets target platform for compiling test components. Default value is "armv5 urel". |
316 |
@type string |
|
317 |
@scope public |
|
318 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
319 |
<property name="ats.target.platform" value="armv5 urel" /> |
217 | 320 |
<!-- Should be "True" if tracing is needed during the tests running on ATS3. Default value is "False", the values are case-sensitive. |
321 |
@type string |
|
322 |
@scope public |
|
323 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
324 |
<property name="ats.trace.enabled" value="False" /> |
217 | 325 |
<!-- 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. |
326 |
@type string |
|
327 |
@scope public |
|
328 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
329 |
<property name="ats.ctc.enabled" value="False" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
330 |
<property name="ats.multiset.enabled" value="False" /> |
217 | 331 |
<!-- Flags for EUnit exerunner can be set by setting the value of this variable. The default flags are set to "/E S60AppEnv /R Off". |
332 |
@type string |
|
333 |
@scope public |
|
334 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
335 |
<property name="eunitexerunner.flags" value="/E S60AppEnv /R Off" /> |
217 | 336 |
<!-- 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. |
337 |
@type string |
|
338 |
@scope public |
|
339 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
340 |
<property name="ats.obey.pkgfiles.rule" value="False" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
341 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
342 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
343 |
<!-- 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
|
344 |
<target name="ats-set-defaults-aste" depends="ats-common"> |
179 | 345 |
<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
|
346 |
<property name="ats.aste.test.type" value="smoke" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
347 |
<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
|
348 |
<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
|
349 |
<property name="ats.aste.language" value="English" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
350 |
<property name="ats.aste.software.release" value="${build.name}" /> |
217 | 351 |
<!-- Modify the plan name if you have understanding of test.xml file or leave it as it is. Default value is "plan" |
352 |
@type string |
|
353 |
@scope public |
|
354 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
355 |
<property name="ats.aste.plan.name" value="plan" /> |
217 | 356 |
<!-- 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 |
357 |
@type string |
|
358 |
@scope public |
|
359 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
360 |
<property name="ats.aste.testrun.name" value="${build.id}_${ats.product.name}_${major.version}.${minor.version}" /> |
217 | 361 |
<!-- 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. |
362 |
@type string |
|
363 |
@scope public |
|
364 |
--> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
365 |
<property name="ats.aste.email.list" value="" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
366 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
367 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
368 |
<!-- This macro fetches the tsrc paths from system definition file (layers.sysdef.xml), layer defintion should look like |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
369 |
<pre> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
370 |
<layer name="name_test_layer"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
371 |
<module name="module_name"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
372 |
<unit id="unit_id" name="unti_name" bldFile="path_of_tsrc_folder_to_be_built" filter="" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
373 |
</module> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
374 |
</layer> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
375 |
</pre> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
376 |
--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
377 |
<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
|
378 |
<attribute name="property" /> |
179 | 379 |
<attribute name="prefix"/> |
380 |
import traceback |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
381 |
import os |
179 | 382 |
import atsant |
383 |
from com.nokia.ant.util import Helper |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
384 |
|
179 | 385 |
canonicalsysdeffile = Helper.getProperty(project, 'canonical.sysdef.file') |
386 |
modules = atsant.files_to_test(canonicalsysdeffile, project.getProperty('exclude.test.layers'), project.getProperty('ido.build.filter'), project.getProperty('build.drive')) |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
387 |
|
179 | 388 |
for name in modules.keys(): |
389 |
if modules[name] == []: |
|
390 |
del modules[name] |
|
391 |
else: |
|
392 |
project.setProperty("%s.%s" % (attributes.get('prefix'), name), " ".join(modules[name])) |
|
393 |
||
394 |
project.setProperty(attributes.get('property'), ",".join(modules.keys())) |
|
395 |
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
|
396 |
</scriptdef> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
397 |
|
179 | 398 |
<!-- The target is dependent on "ats-test", should not be called individually. The target creates the ATSdrop.zip file including test:xml file --> |
399 |
<target name="ats-create-drop" depends="ats-set-flash-image-path"> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
400 |
<mkdir dir="${build.output.dir}/ats" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
401 |
<hlm:getModuleTsrcMacro property="module.list" prefix="module.tsrc" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
402 |
<if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
403 |
<scriptcondition language="beanshell"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
404 |
<![CDATA[ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
405 |
String value = project.getProperty("module.list"); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
406 |
if (value != null) { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
407 |
String[] out = value.split(","); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
408 |
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
|
409 |
self.setValue(true); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
410 |
} else { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
411 |
self.setValue(false); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
412 |
} |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
413 |
} else { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
414 |
self.log("Error: module.list not defined."); |
179 | 415 |
self.setValue(true); |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
416 |
} |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
417 |
]]> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
418 |
</scriptcondition> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
419 |
<then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
420 |
<echo message="Error: No test modules found!" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
421 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
422 |
<else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
423 |
<for list="${module.list}" delimiter="," param="module"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
424 |
<sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
425 |
<runtarget target="ats-set-defaults-stifeunit" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
426 |
<echo>${ats.drop.file}</echo> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
427 |
<exec executable="python"> |
217 | 428 |
<arg line="-m ats3.__init__" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
429 |
<arg value="--device-type=${ats.product.name}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
430 |
<arg value="--device-hwid=${ats.product.hwid}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
431 |
<arg value="${internal.ats.diamonds.arg}" /> |
179 | 432 |
<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
|
433 |
<arg value="--report-email=${ats.email.list}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
434 |
<arg value="--plan-name=${ats.plan.name}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
435 |
<arg value="--testrun-name=${ats.testrun.name}_@{module}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
436 |
<arg value="--flash-images=${ats.flash.images}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
437 |
<arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
438 |
<arg value="--target-platform=${ats.target.platform}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
439 |
<arg value="--data-dir=${tsrc.data.dir}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
440 |
<arg value="--test-timeout=${ats.test.timeout}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
441 |
<arg value="--build-drive=${build.drive}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
442 |
<arg value="--trace-enabled=${ats.trace.enabled}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
443 |
<arg value="--ctc-enabled=${ats.ctc.enabled}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
444 |
<arg value="--multiset-enabled=${ats.multiset.enabled}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
445 |
<arg value="--file-store=${ats.report.location}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
446 |
<arg value="--eunitexerunner-flags=${eunitexerunner.flags}" /> |
179 | 447 |
<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
|
448 |
<arg value="--monsym-files=${ats.ctc.monsyms}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
449 |
<arg value="--config=${ats.config.file}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
450 |
<arg value="--obey-pkgfiles=${ats.obey.pkgfiles.rule}" /> |
179 | 451 |
<arg value="--ats4-enabled=${ats4.enabled}" /> |
217 | 452 |
<arg value="--specific-pkg=${ats.specific.pkg}" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
453 |
<arg value="--verbose" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
454 |
<arg line="${module.tsrc.@{module}}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
455 |
</exec> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
456 |
<runtarget target="do-ats-test" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
457 |
<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
|
458 |
</sequential> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
459 |
</for> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
460 |
</else> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
461 |
</if> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
462 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
463 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
464 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
465 |
<!-- Please see ats-aste for description.--> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
466 |
<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
|
467 |
<mkdir dir="${build.output.dir}/ats" /> |
179 | 468 |
<exec executable="python"> |
217 | 469 |
<arg line="-m ats3.aste" /> |
179 | 470 |
<arg value="--report-email=${ats.aste.email.list}" /> |
471 |
<arg value="--device-type=${ats.product.name}" /> |
|
472 |
<arg value="--flash-images=${ats.flash.images}" /> |
|
473 |
<arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" /> |
|
474 |
<arg value="--plan-name=${ats.aste.plan.name}" /> |
|
475 |
<arg value="--testrun-name=${ats.aste.testrun.name}" /> |
|
476 |
<arg value="--device-hwid=${ats.product.hwid}" /> |
|
477 |
<arg value="--test-timeout=${ats.test.timeout}" /> |
|
478 |
<arg value="--build-drive=${build.drive}" /> |
|
479 |
<arg value="${internal.ats.diamonds.arg}" /> |
|
480 |
<arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" /> |
|
481 |
<arg value="--test-type=${ats.aste.test.type}" /> |
|
482 |
<arg value="--testasset-location=${ats.aste.testasset.location}" /> |
|
483 |
<arg value="--testasset-caseids=${ats.aste.testasset.caseids}" /> |
|
484 |
<arg value="--software-version=${ats.aste.software.version}" /> |
|
485 |
<arg value="--device-language=${ats.aste.language}" /> |
|
486 |
<arg value="--software-release=${ats.aste.software.release}" /> |
|
487 |
<arg value="--ats4-enabled=${ats4.enabled}" /> |
|
488 |
<arg value="--verbose" /> |
|
489 |
</exec> |
|
490 |
<runtarget target="do-ats-test" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
491 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
492 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
493 |
<!-- |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
494 |
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
|
495 |
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
|
496 |
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
|
497 |
--> |
179 | 498 |
<target name="copy-mon-sym"> |
499 |
<if> |
|
500 |
<istrue value="${ats.ctc.enabled}"/> |
|
501 |
<then> |
|
502 |
<fmpp sourceFile="${helium.dir}/tools/testing/ats/templates/monsym-file-list.txt.ftl" |
|
503 |
outputFile="${temp.build.dir}/monsym-file-list.txt"> |
|
504 |
<data expandProperties="yes"> |
|
505 |
data: xml(${canonical.sysdef.file}) |
|
506 |
ant: antProperties() |
|
507 |
</data> |
|
508 |
</fmpp> |
|
509 |
<hlm:path2file reference="mon.sym.list" file="${temp.build.dir}/monsym-file-list.txt" /> |
|
510 |
<script language="jython"> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
511 |
import os |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
512 |
import ctc |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
513 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
514 |
if not project.getProperty('ats.ctc.host'): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
515 |
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
|
516 |
if not project.getProperty('diamonds.build.id'): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
517 |
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
|
518 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
519 |
server = project.getProperty('ats.ctc.host') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
520 |
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
|
521 |
path = project.getReference('mon.sym.list') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
522 |
if not path: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
523 |
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
|
524 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
525 |
uploader = ctc.MonSymFTPUploader(server, path.list(), diamondsid) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
526 |
monsyms = uploader.upload() |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
527 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
528 |
# 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
|
529 |
project.setNewProperty('ats.ctc.monsyms', ';'.join([ "//%s/%s" % (server, x) for x in monsyms])) |
179 | 530 |
</script> |
531 |
<echo>ats.ctc.monsyms: ${ats.ctc.monsyms}</echo> |
|
532 |
</then> |
|
533 |
</if> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
534 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
535 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
536 |
<!-- 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
|
537 |
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
|
538 |
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
|
539 |
<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
|
540 |
<runtarget target="ats-set-defaults-stifeunit" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
541 |
<!--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
|
542 |
<mkdir dir="${build.output.dir}/ats" /> |
179 | 543 |
<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
|
544 |
<if> |
179 | 545 |
<!-- 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
|
546 |
<scriptcondition language="beanshell"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
547 |
<![CDATA[ |
179 | 548 |
String sisfiles = project.getProperty("ats.sis.images"); |
549 |
String value = project.getProperty("ats.sisfiles.minlimit"); |
|
550 |
if (sisfiles != null && value != null) { |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
551 |
int cond = Integer.valueOf(value).intValue(); |
179 | 552 |
String[] out = sisfiles.split(","); |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
553 |
if (out.length < cond ) { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
554 |
self.setValue(true); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
555 |
} else { |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
556 |
self.setValue(false); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
557 |
} |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
558 |
} else { |
179 | 559 |
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
|
560 |
self.setValue(true); |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
561 |
} |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
562 |
]]> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
563 |
</scriptcondition> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
564 |
<then> |
179 | 565 |
<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
|
566 |
</then> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
567 |
<else> |
179 | 568 |
<!-- execute the MattiDrops.py script with parameters--> |
569 |
<exec executable="python" resultproperty="script.response"> |
|
217 | 570 |
<arg line="-m ats3.matti.MattiDrops" /> |
179 | 571 |
<arg value="--build-drive=${build.drive}" /> |
572 |
<arg value="--matti-scripts=${matti.scripts}" /> |
|
573 |
<arg value="--flash-images=${ats.flash.images}" /> |
|
574 |
<arg value="--harness=STIF" /> |
|
575 |
<arg value="--file-store=${ats.output.dir}" /> |
|
576 |
<arg value="--testrun-name=${ats.testrun.name}" /> |
|
577 |
<arg value="--device-type=${ats.product.name}" /> |
|
578 |
<arg value="--device-hwid=${ats.product.hwid}" /> |
|
579 |
<arg value="--diamonds-build-url=${internal.ats.diamonds.arg}" /> |
|
580 |
<arg value="--drop-file=${build.output.dir}/ats/${ats.drop.file}" /> |
|
581 |
<arg value="--minimum-flash-images=${ats.flashfiles.minlimit}" /> |
|
582 |
<arg value="--plan-name=${ats.plan.name}" /> |
|
583 |
<arg value="--sis-files=${ats.sis.images}" /> |
|
584 |
<arg value="--template-loc=${template.file}" /> |
|
585 |
</exec> |
|
586 |
<if> |
|
587 |
<not> |
|
588 |
<!-- if the response is not 0 then need to create the skip.ats.sending |
|
589 |
flag so that do-ats-test is not run--> |
|
590 |
<equals arg1="${script.response}" arg2="0" /> |
|
591 |
</not> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
592 |
<then> |
217 | 593 |
<!-- Skips sending drop package file to ATS/ASTE after its creation. |
594 |
@type boolean |
|
595 |
@scope public |
|
596 |
--> |
|
179 | 597 |
<property name="skip.ats.sending" value="1" /> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
598 |
</then> |
179 | 599 |
</if> |
600 |
<runtarget target="do-ats-test" /> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
601 |
</else> |
179 | 602 |
</if> |
603 |
</target> |
|
604 |
||
217 | 605 |
<!-- Temp dir |
606 |
@type string |
|
607 |
@scope private |
|
608 |
--> |
|
179 | 609 |
<property name="ats.evalid.pre" value="${temp.build.dir}/${build.id}_atsevalidpre" /> |
217 | 610 |
<!-- Temp dir |
611 |
@type string |
|
612 |
@scope private |
|
613 |
--> |
|
179 | 614 |
<property name="ats.evalid.post" value="${temp.build.dir}/${build.id}_atsevalidpost" /> |
615 |
||
616 |
<!-- Call before preperation --> |
|
617 |
<target name="find-files-pre" if="ats.delta.enabled"> |
|
618 |
<hlm:evalidMacro dir="${ats.evalid.pre}"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
619 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
620 |
|
179 | 621 |
<!-- Call after preperation --> |
622 |
<target name="find-files-post" if="ats.delta.enabled"> |
|
623 |
<hlm:evalidMacro dir="${ats.evalid.post}"/> |
|
624 |
</target> |
|
625 |
||
626 |
<!-- Run evalid on ido directories --> |
|
627 |
<macrodef name="evalidMacro" uri="http://www.nokia.com/helium"> |
|
628 |
<attribute name="dir"/> |
|
629 |
<sequential> |
|
630 |
<runtarget target="ido-create-ado-mapping"/> |
|
631 |
<hlm:python> |
|
632 |
import delta_zip |
|
633 |
delta_zip.evalidAdomapping(r'${build.drive}', r'@{dir}', r'${ado.mapping.file}') |
|
634 |
</hlm:python> |
|
635 |
</sequential> |
|
636 |
</macrodef> |
|
637 |
||
638 |
<!-- Generate sysdef fileset based on evalid data --> |
|
639 |
<target name="ats-delta" if="ats.delta.enabled"> |
|
640 |
<script language="jython"> |
|
641 |
import ido |
|
642 |
from com.nokia.ant.util import Helper |
|
643 |
import delta_zip |
|
644 |
import os |
|
645 |
||
646 |
atspath = project.createDataType("path") |
|
647 |
i = project.getReference('system.definition.files').iterator() |
|
648 |
changedfiles = delta_zip.changedFiles(Helper.getProperty(project, 'ats.evalid.pre'), Helper.getProperty(project, 'ats.evalid.post')) |
|
649 |
while i.hasNext(): |
|
650 |
path = i.next().toString() |
|
651 |
sysdefpath = os.path.abspath(os.path.join(project.getProperty('build.drive') + os.sep, ido.get_sysdef_location(path))) |
|
652 |
for f in changedfiles: |
|
653 |
if sysdefpath.lower() in os.path.abspath(f).lower(): |
|
654 |
pe = atspath.createPathElement() |
|
655 |
pe.setPath(path) |
|
656 |
break |
|
657 |
project.addReference('ats.system.definition.files', atspath) |
|
658 |
</script> |
|
659 |
</target> |
|
660 |
||
661 |
<!-- Common target to run ats, aste and matti --> |
|
662 |
<target name="run-test" depends="ats-test,ats-aste,matti-test"/> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
663 |
</project> |