587
|
1 |
<?xml version="1.0"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_diamonds.ant.xml
|
|
5 |
Part of : Helium AntLib
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
23 |
<project name="test-diamonds" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
24 |
<description>Helium Antlib diamonds unittests.</description>
|
|
25 |
<property environment="env" />
|
628
|
26 |
<taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
|
|
27 |
<taskdef name="xpathtest" classname="se.jtech.ant.xpath.XPathEvaluatorTask" onerror="ignore"/>
|
|
28 |
<property name="diamonds.enabled" value="true" />
|
587
|
29 |
<property name="diamonds.unitest.dir" location="${ant.file.test-diamonds}/../../../" />
|
|
30 |
<import file="../../../../../../nokia/companyproperties.ant.xml" optional="true"/>
|
628
|
31 |
<import file="../../config/diamonds_config_default.ant.xml" />
|
587
|
32 |
<property name="diamonds.output.dir" location="${temp.dir}/output" />
|
|
33 |
<property name="diamonds.template.dir" location="${diamonds.unitest.dir}/data/templates" />
|
|
34 |
<property name="build.family" value="test_new_hlm"/>
|
|
35 |
<property name="id" value="123"/>
|
|
36 |
<property name="name" value="${build.family}_${id}"/>
|
|
37 |
<property name="build.system" value="ec-helium"/>
|
|
38 |
<property name="compile.log.input" location="${diamonds.unitest.dir}/data/compile.log.xml" />
|
|
39 |
<property name="codescanner.log.input" location="${diamonds.unitest.dir}/data/problemIndex.xml" />
|
|
40 |
<property name="policy.log.input" location="${diamonds.unitest.dir}/data/policy.log.xml" />
|
|
41 |
<property name="invalid.target.input.file" location="${diamonds.unitest.dir}/data/invalid.target.input.log.xml" />
|
|
42 |
<property name="symsee.version" value="9.1.0" />
|
|
43 |
|
628
|
44 |
<import file="${diamonds.unitest.dir}/config/diamonds_config_default.ant.xml" />
|
|
45 |
|
587
|
46 |
|
|
47 |
<target name="unittest" depends="unittest-diamonds" />
|
|
48 |
|
|
49 |
<target name="unittest-diamonds" >
|
|
50 |
<delete dir="${diamonds.output.dir}" failonerror="false"/>
|
|
51 |
<mkdir dir="${diamonds.output.dir}"/>
|
|
52 |
<antcall target="test-all" />
|
|
53 |
</target>
|
|
54 |
|
|
55 |
<dirname property="project.dir" file="${ant.file.test-diamonds}" />
|
|
56 |
<target name="version">
|
|
57 |
<echo message="version target for diamonds to verify sending data to diamonds" />
|
|
58 |
</target>
|
|
59 |
|
|
60 |
<target name="diamonds" />
|
|
61 |
|
|
62 |
<target name="compile-target">
|
|
63 |
<echo message="verify the build stage with input source xml file" />
|
|
64 |
</target>
|
|
65 |
|
|
66 |
<target name="codescanner">
|
|
67 |
<echo message="target verification with input source xml file" />
|
|
68 |
</target>
|
|
69 |
|
|
70 |
<target name="create-bom-log">
|
|
71 |
<echo message="target without input file and just to send the data" />
|
|
72 |
</target>
|
|
73 |
|
|
74 |
|
|
75 |
<target name="defer-type">
|
|
76 |
<echo message="version target for diamonds to verify sending data to diamonds" />
|
|
77 |
</target>
|
|
78 |
|
|
79 |
<target name="test-defer-type">
|
|
80 |
<antcall target="defer-type" />
|
|
81 |
</target>
|
|
82 |
|
|
83 |
<target name="test-create-bom-log">
|
|
84 |
<antcall target="create-bom-log" />
|
|
85 |
</target>
|
|
86 |
|
|
87 |
<target name="test-codescanner">
|
|
88 |
<antcall target="codescanner" />
|
|
89 |
</target>
|
|
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
<target name="test-compile-target">
|
|
95 |
<antcall target="compile-target" />
|
|
96 |
</target>
|
|
97 |
|
|
98 |
<target name="test-version">
|
|
99 |
<antcall target="version" />
|
628
|
100 |
<au:assertTrue>
|
|
101 |
<isset property="diamonds.build.id"/>
|
|
102 |
</au:assertTrue>
|
587
|
103 |
</target>
|
|
104 |
|
|
105 |
<target name="test-buildid-set">
|
|
106 |
<echo>${diamonds.build.id}</echo>
|
|
107 |
<au:assertTrue>
|
|
108 |
<isset property="diamonds.build.id"/>
|
|
109 |
</au:assertTrue>
|
628
|
110 |
<get src="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}?fmt=xml"
|
|
111 |
dest="${temp.dir}/test-buildid-set_output.xml"
|
|
112 |
usetimestamp="true" />
|
|
113 |
<xpathtest xmlfile="${temp.dir}/test-buildid-set_output.xml">
|
|
114 |
<namespace uri="" prefix=""/>
|
|
115 |
<xpath expression="/diamonds-build[schema='23']"/>
|
|
116 |
</xpathtest>
|
587
|
117 |
</target>
|
|
118 |
|
|
119 |
<target name="test-buildid-notset">
|
|
120 |
<au:assertFalse>
|
|
121 |
<isset property="diamonds.build.id"/>
|
|
122 |
</au:assertFalse>
|
|
123 |
</target>
|
|
124 |
|
588
|
125 |
<target name="test-echo-operation">
|
|
126 |
<echo message="echo operation: test" />
|
628
|
127 |
<au:assertTrue>
|
|
128 |
<isset property="diamonds.build.id"/>
|
|
129 |
</au:assertTrue>
|
588
|
130 |
</target>
|
|
131 |
|
|
132 |
<target name="test-echo-operation1">
|
|
133 |
<echo message="echo operation1: test" />
|
|
134 |
</target>
|
|
135 |
|
|
136 |
<target name="test-echo-operation2">
|
|
137 |
<echo message="echo operation2: test" />
|
|
138 |
</target>
|
|
139 |
|
|
140 |
<target name="test-echo-operation3">
|
|
141 |
<echo message="echo operation3: test" />
|
|
142 |
</target>
|
|
143 |
|
|
144 |
<target name="test-echo-operation4">
|
|
145 |
<echo message="echo operation4: test" />
|
|
146 |
</target>
|
|
147 |
|
|
148 |
<target name="test-echo-operation5">
|
|
149 |
<echo message="echo operation5: test" />
|
|
150 |
</target>
|
|
151 |
|
628
|
152 |
<target name="test-depend-target" depends="test-echo-operation" />
|
588
|
153 |
|
|
154 |
<target name="test-ant-call">
|
|
155 |
<echo message="test-ant-call" />
|
628
|
156 |
<delete file="${diamonds.output.dir}/diamonds_stage.xml" failonerror="false" />
|
588
|
157 |
<antcall target="test-echo-operation1" />
|
|
158 |
</target>
|
|
159 |
|
|
160 |
<target name="test-ant-call-multiple">
|
|
161 |
<echo message="test-ant-call" />
|
628
|
162 |
<delete file="${diamonds.output.dir}/diamonds_stage.xml" failonerror="false" />
|
588
|
163 |
<antcall target="test-echo-operation2" />
|
|
164 |
<antcall target="test-echo-operation3" />
|
|
165 |
</target>
|
|
166 |
|
|
167 |
<target name="test-ant-call-multiple-parallel">
|
|
168 |
<echo message="test-ant-call" />
|
628
|
169 |
<delete file="${diamonds.output.dir}/diamonds_stage.xml" failonerror="false" />
|
588
|
170 |
<parallel>
|
|
171 |
<antcall target="test-echo-operation4" />
|
|
172 |
<antcall target="test-echo-operation5" />
|
|
173 |
</parallel>
|
|
174 |
</target>
|
|
175 |
|
|
176 |
<target name="sequence-config-test-target-1">
|
|
177 |
</target>
|
|
178 |
|
|
179 |
<target name="sequence-config-test-target-2">
|
|
180 |
</target>
|
|
181 |
|
628
|
182 |
<target name="test-verify-targets">
|
|
183 |
<get src="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}?fmt=xml"
|
|
184 |
dest="${temp.dir}/test-verify-targets.xml"
|
|
185 |
usetimestamp="true" />
|
|
186 |
<xpathtest xmlfile="${temp.dir}/test-verify-targets.xml">
|
|
187 |
<namespace uri="" prefix=""/>
|
|
188 |
<xpath expression="/diamonds-build/tools/tool[name='SymSEE']"/>
|
|
189 |
</xpathtest>
|
|
190 |
</target>
|
|
191 |
|
|
192 |
<target name="test-verify-stages">
|
|
193 |
<get src="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}?fmt=xml"
|
|
194 |
dest="${temp.dir}/test-verify-stages.xml"
|
|
195 |
usetimestamp="true" />
|
|
196 |
<xpathtest xmlfile="${temp.dir}/test-verify-stages.xml">
|
|
197 |
<namespace uri="" prefix=""/>
|
|
198 |
<xpath expression="/diamonds-build/stages/stage[name='test-echo-operation']"/>
|
|
199 |
<xpath expression="/diamonds-build/stages/stage[name='test-echo-operation1']"/>
|
|
200 |
<xpath expression="/diamonds-build/stages/stage[name='test-echo-operation2']"/>
|
|
201 |
<xpath expression="/diamonds-build/stages/stage[name='test-echo-operation3']"/>
|
|
202 |
<xpath expression="/diamonds-build/stages/stage[name='test-echo-operation4']"/>
|
|
203 |
<xpath expression="/diamonds-build/stages/stage[name='test-echo-operation5']"/>
|
|
204 |
<xpath expression="/diamonds-build/stages/stage[name='stage-sequence-1']"/>
|
|
205 |
<xpath expression="/diamonds-build/stages/stage[name='stage-sequence-2']"/>
|
|
206 |
</xpathtest>
|
|
207 |
</target>
|
588
|
208 |
|
587
|
209 |
<target name="test-all" depends="test-buildid-notset, diamonds, test-buildid-set, test-defer-type, test-version,
|
628
|
210 |
test-create-bom-log,test-codescanner,test-compile-target, test-depend-target,
|
588
|
211 |
test-ant-call, test-ant-call-multiple, test-ant-call-multiple-parallel,
|
628
|
212 |
sequence-config-test-target-1,sequence-config-test-target-2, test-verify-stages, test-verify-targets" />
|
587
|
213 |
</project> |