21 ============================================================================ |
21 ============================================================================ |
22 --> |
22 --> |
23 <project name="test-diamonds-invalid-address" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> |
23 <project name="test-diamonds-invalid-address" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium"> |
24 <description>Helium Antlib diamonds unittests.</description> |
24 <description>Helium Antlib diamonds unittests.</description> |
25 <property environment="env" /> |
25 <property environment="env" /> |
26 |
26 <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/> |
|
27 <property name="diamonds.enabled" value="true" /> |
27 <property name="diamonds.host" value="invalid.server.local" /> |
28 <property name="diamonds.host" value="invalid.server.local" /> |
28 <property name="diamonds.port" value="80" /> |
29 <property name="diamonds.port" value="80" /> |
29 <property name="diamonds.path" value="/diamonds/builds/" /> |
30 <property name="diamonds.path" value="/diamonds/builds/" /> |
30 <property name="diamonds.mail" value="diamonds@invalid.server.local" /> |
31 <property name="diamonds.mail" value="diamonds@invalid.server.local" /> |
31 |
|
32 <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds-invalid-address}/../../../" /> |
32 <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds-invalid-address}/../../../" /> |
33 <property name="diamonds.output.dir" location="${temp.dir}/output" /> |
33 <property name="diamonds.output.dir" location="${temp.dir}/output" /> |
34 <property name="diamonds.template.dir" location="${diamonds.unitest.dir}/data/templates" /> |
34 <property name="diamonds.template.dir" location="${diamonds.unitest.dir}/data/templates" /> |
35 <property name="build.family" value="test_new_hlm"/> |
35 <property name="build.family" value="test_new_hlm"/> |
36 <property name="id" value="123"/> |
36 <property name="id" value="123"/> |
37 <property name="name" value="${build.family}_${id}"/> |
37 <property name="name" value="${build.family}_${id}"/> |
38 <property name="build.system" value="ec-helium"/> |
38 <property name="build.system" value="ec-helium"/> |
39 <property name="diamonds.listener.configuration.file" location="${diamonds.unitest.dir}/config/diamonds_config.xml.ftl" /> |
|
40 <property name="compile.log.input" location="${diamonds.unitest.dir}/data/compile.log.xml" /> |
39 <property name="compile.log.input" location="${diamonds.unitest.dir}/data/compile.log.xml" /> |
41 <property name="codescanner.log.input" location="${diamonds.unitest.dir}/data/problemIndex.xml" /> |
40 <property name="codescanner.log.input" location="${diamonds.unitest.dir}/data/problemIndex.xml" /> |
42 <property name="policy.log.input" location="${diamonds.unitest.dir}/data/policy.log.xml" /> |
41 <property name="policy.log.input" location="${diamonds.unitest.dir}/data/policy.log.xml" /> |
43 <property name="invalid.target.input.file" location="${diamonds.unitest.dir}/data/invalid.target.input.log.xml" /> |
42 <property name="invalid.target.input.file" location="${diamonds.unitest.dir}/data/invalid.target.input.log.xml" /> |
44 <property name="symsee.version" value="9.1.0" /> |
43 <property name="symsee.version" value="9.1.0" /> |
|
44 <import file="../../config/diamonds_config_default.ant.xml" /> |
45 |
45 |
46 <target name="unittest" depends="unittest-diamonds" /> |
46 <target name="unittest" depends="unittest-diamonds" /> |
47 |
47 |
48 <target name="unittest-diamonds" > |
48 <target name="unittest-diamonds" > |
49 <delete dir="${diamonds.output.dir}" failonerror="false"/> |
49 <delete dir="${diamonds.output.dir}" failonerror="false"/> |
94 <echo message="target with invalid-diamonds-server-properties" /> |
91 <echo message="target with invalid-diamonds-server-properties" /> |
95 </target> |
92 </target> |
96 |
93 |
97 <target name="defer-type"> |
94 <target name="defer-type"> |
98 <echo message="version target for diamonds to verify sending data to diamonds" /> |
95 <echo message="version target for diamonds to verify sending data to diamonds" /> |
99 </target> |
|
100 |
|
101 <target name="test-defer-type"> |
|
102 <antcall target="defer-type" /> |
|
103 </target> |
|
104 |
|
105 <target name="test-create-bom-log"> |
|
106 <antcall target="create-bom-log" /> |
|
107 </target> |
|
108 |
|
109 <target name="test-codescanner"> |
|
110 <antcall target="codescanner" /> |
|
111 </target> |
96 </target> |
112 |
97 |
113 <target name="test-invalid-target-input-file"> |
98 <target name="test-invalid-target-input-file"> |
114 <antcall target="invalid-target-input-file" /> |
99 <antcall target="invalid-target-input-file" /> |
115 </target> |
100 </target> |
121 |
106 |
122 <target name="test-invalid-template-file"> |
107 <target name="test-invalid-template-file"> |
123 <antcall target="invalid-template-file" /> |
108 <antcall target="invalid-template-file" /> |
124 </target> |
109 </target> |
125 |
110 |
126 <target name="test-invalid-ant-properties-input"> |
|
127 <antcall target="invalid-ant-properties-input" /> |
|
128 </target> |
|
129 |
|
130 <target name="test-non-existing-ant-properties"> |
111 <target name="test-non-existing-ant-properties"> |
131 <antcall target="non-existing-ant-properties" /> |
112 <antcall target="non-existing-ant-properties" /> |
132 </target> |
113 </target> |
133 |
114 |
134 <target name="test-invalid-diamonds-server-properties"> |
|
135 <antcall target="invalid-diamonds-server-properties" /> |
|
136 <echo message="target with invalid-diamonds-server-properties" /> |
|
137 </target> |
|
138 |
|
139 <target name="test-compile-target"> |
|
140 <antcall target="compile-target" /> |
|
141 </target> |
|
142 |
115 |
143 <target name="test-version"> |
116 <target name="test-version"> |
144 <antcall target="version" /> |
117 <antcall target="version" /> |
145 </target> |
118 </target> |
146 |
119 |
147 <target name="test-buildid-set"> |
120 <target name="test-buildid-set"> |
148 <echo>${diamonds.build.id}</echo> |
121 <echo>${diamonds.build.id}</echo> |
149 <au:assertTrue> |
122 <au:assertFalse> |
150 <isset property="diamonds.build.id"/> |
123 <isset property="diamonds.build.id"/> |
151 </au:assertTrue> |
124 </au:assertFalse> |
152 </target> |
125 </target> |
153 |
126 |
154 <target name="test-buildid-notset"> |
127 <target name="test-buildid-notset"> |
155 <au:assertFalse> |
128 <au:assertFalse> |
156 <isset property="diamonds.build.id"/> |
129 <isset property="diamonds.build.id"/> |
157 </au:assertFalse> |
130 </au:assertFalse> |
158 </target> |
131 </target> |
159 |
132 |
160 <target name="test-all" depends="test-buildid-notset, diamonds, test-buildid-set, test-defer-type, test-version, |
133 <target name="test-verify-targets"> |
161 test-create-bom-log,test-codescanner,test-compile-target,test-invalid-diamonds-server-properties, |
134 <au:assertFalse> |
162 test-non-existing-ant-properties,test-invalid-ant-properties-input,test-invalid-template-file, |
135 <isset property="diamonds.build.id"/> |
163 test-invalid-target-input-file,test-invalid-stage-input-file " /> |
136 </au:assertFalse> |
|
137 </target> |
|
138 |
|
139 <target name="test-verify-stages"> |
|
140 <au:assertFalse> |
|
141 <isset property="diamonds.build.id"/> |
|
142 </au:assertFalse> |
|
143 </target> |
|
144 |
|
145 <target name="test-all" depends="test-buildid-notset, diamonds, test-buildid-set, test-version, |
|
146 test-verify-stages, test-verify-targets" /> |
164 </project> |
147 </project> |