diff options
author | Sean Dague | 2009-08-31 20:15:20 -0400 |
---|---|---|
committer | Sean Dague | 2009-08-31 20:15:20 -0400 |
commit | cc30fce49f212bea86335d0f6adec2f49e1809bb (patch) | |
tree | e38ac2a3f460cd9bc5e0441e4a026d1fa1edcf2b /.nant/local.include | |
parent | add some fail detection to the new test-xml target (diff) | |
download | opensim-SC_OLD-cc30fce49f212bea86335d0f6adec2f49e1809bb.zip opensim-SC_OLD-cc30fce49f212bea86335d0f6adec2f49e1809bb.tar.gz opensim-SC_OLD-cc30fce49f212bea86335d0f6adec2f49e1809bb.tar.bz2 opensim-SC_OLD-cc30fce49f212bea86335d0f6adec2f49e1809bb.tar.xz |
change regular test target to use nunit exec mode
detect if you have nunit-console2 or nunit-console and use the appropriate one
Diffstat (limited to '')
-rw-r--r-- | .nant/local.include | 109 |
1 files changed, 81 insertions, 28 deletions
diff --git a/.nant/local.include b/.nant/local.include index 1e1c030..eaccfdd 100644 --- a/.nant/local.include +++ b/.nant/local.include | |||
@@ -1,6 +1,7 @@ | |||
1 | <!-- -*- xml -*- --> | 1 | <!-- -*- xml -*- --> |
2 | <!-- please leve the top comment for us emacs folks --> | 2 | <!-- please leave the top comment for us emacs folks --> |
3 | <property name="projectdir" value="opensim-0.5.5" /> | 3 | <property name="projectdir" value="opensim-0.5.5" /> |
4 | <property name="nunitcmd" value="nunit-console" /> | ||
4 | 5 | ||
5 | <target name="distdir"> | 6 | <target name="distdir"> |
6 | <delete dir="${projectdir}" /> | 7 | <delete dir="${projectdir}" /> |
@@ -29,24 +30,56 @@ | |||
29 | <touch file="${projectdir}/bin/startup_commands.txt" /> | 30 | <touch file="${projectdir}/bin/startup_commands.txt" /> |
30 | </target> | 31 | </target> |
31 | 32 | ||
32 | <target name="test" depends="build"> | 33 | <target name="test" depends="build, find-nunit"> |
33 | <setenv name="MONO_THREADS_PER_CPU" value="100" /> | 34 | <setenv name="MONO_THREADS_PER_CPU" value="100" /> |
34 | <nunit2 failonerror="true" verbose="true"> | 35 | |
35 | <formatter type="Plain" /> | 36 | <!-- Unit Test Assembly --> |
36 | <test> | 37 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.tests"> |
37 | <assemblies> | 38 | <arg value="./bin/OpenSim.Framework.Tests.dll" /> |
38 | <include name="./bin/OpenSim.Framework.Tests.dll" /> | 39 | </exec> |
39 | <include name="./bin/OpenSim.Framework.Communications.Tests.dll"/> | 40 | |
40 | <include name="./bin/OpenSim.Framework.Servers.Tests.dll" /> | 41 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.communications.tests"> |
41 | <include name="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> | 42 | <arg value="./bin/OpenSim.Framework.Communications.Tests.dll" /> |
42 | <include name="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> | 43 | </exec> |
43 | <include name="./bin/OpenSim.Region.CoreModules.Tests.dll" /> | 44 | |
44 | <include name="./bin/OpenSim.Region.Framework.Tests.dll" /> | 45 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.servers.tests"> |
45 | <include name="./bin/OpenSim.Data.SQLite.Tests.dll" /> | 46 | <arg value="./bin/OpenSim.Framework.Servers.Tests.dll" /> |
46 | <include name="./bin/OpenSim.Data.MySQL.Tests.dll" /> | 47 | </exec> |
47 | </assemblies> | 48 | |
48 | </test> | 49 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests"> |
49 | </nunit2> | 50 | <arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> |
51 | </exec> | ||
52 | |||
53 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.scriptengine.tests"> | ||
54 | <arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> | ||
55 | </exec> | ||
56 | |||
57 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.coremodules.tests"> | ||
58 | <arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" /> | ||
59 | </exec> | ||
60 | |||
61 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.framework.tests"> | ||
62 | <arg value="./bin/OpenSim.Region.Framework.Tests.dll" /> | ||
63 | </exec> | ||
64 | |||
65 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.sqlite.tests"> | ||
66 | <arg value="./bin/OpenSim.Data.SQLite.Tests.dll" /> | ||
67 | </exec> | ||
68 | |||
69 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.mysql.tests"> | ||
70 | <arg value="./bin/OpenSim.Data.MySQL.Tests.dll" /> | ||
71 | </exec> | ||
72 | |||
73 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.tests)==0}" /> | ||
74 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.communications.tests)==0}" /> | ||
75 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.servers.tests)==0}" /> | ||
76 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" /> | ||
77 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" /> | ||
78 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" /> | ||
79 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" /> | ||
80 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.sqlite.tests)==0}" /> | ||
81 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.mysql.tests)==0}" /> | ||
82 | |||
50 | </target> | 83 | </target> |
51 | 84 | ||
52 | <target name="test-cov" depends="build"> | 85 | <target name="test-cov" depends="build"> |
@@ -156,53 +189,73 @@ | |||
156 | 189 | ||
157 | </target> | 190 | </target> |
158 | 191 | ||
192 | <target name="find-nunit"> | ||
193 | <exec program="which" failonerror="false" | ||
194 | resultproperty="hasnunit2"> | ||
195 | <arg value="nunit-console2" /> | ||
196 | </exec> | ||
197 | |||
198 | <exec program="which" failonerror="false" | ||
199 | resultproperty="hasnunit"> | ||
200 | <arg value="nunit-console" /> | ||
201 | </exec> | ||
202 | |||
203 | <property name="nunitcmd" value="nunit-console2" | ||
204 | if="${int::parse(hasnunit2)==0}" /> | ||
205 | <property name="nunitcmd" value="nunit-console" | ||
206 | if="${int::parse(hasnunit)==0}" /> | ||
207 | |||
208 | </target> | ||
209 | |||
159 | <!-- this is used for panda test execution --> | 210 | <!-- this is used for panda test execution --> |
160 | <!-- work in progress --> | 211 | <!-- work in progress --> |
161 | 212 | ||
162 | <target name="test-xml" depends="build"> | 213 | <target name="test-xml" depends="build, find-nunit"> |
214 | |||
215 | |||
163 | <mkdir dir="test-results" failonerror="false" /> | 216 | <mkdir dir="test-results" failonerror="false" /> |
164 | <!-- Unit Test Assembly --> | 217 | <!-- Unit Test Assembly --> |
165 | <exec program="nunit-console2" failonerror="false" resultproperty="testresult.opensim.framework.tests"> | 218 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.tests"> |
166 | <arg value="./bin/OpenSim.Framework.Tests.dll" /> | 219 | <arg value="./bin/OpenSim.Framework.Tests.dll" /> |
167 | <arg value="-xml=test-results/OpenSim.Framework.Tests.dll-Results.xml" /> | 220 | <arg value="-xml=test-results/OpenSim.Framework.Tests.dll-Results.xml" /> |
168 | </exec> | 221 | </exec> |
169 | 222 | ||
170 | <exec program="nunit-console2" failonerror="false" resultproperty="testresult.opensim.framework.communications.tests"> | 223 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.communications.tests"> |
171 | <arg value="./bin/OpenSim.Framework.Communications.Tests.dll" /> | 224 | <arg value="./bin/OpenSim.Framework.Communications.Tests.dll" /> |
172 | <arg value="-xml=test-results/OpenSim.Framework.Communications.Tests.dll-Results.xml" /> | 225 | <arg value="-xml=test-results/OpenSim.Framework.Communications.Tests.dll-Results.xml" /> |
173 | </exec> | 226 | </exec> |
174 | 227 | ||
175 | <exec program="nunit-console2" failonerror="false" resultproperty="testresult.opensim.framework.servers.tests"> | 228 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.servers.tests"> |
176 | <arg value="./bin/OpenSim.Framework.Servers.Tests.dll" /> | 229 | <arg value="./bin/OpenSim.Framework.Servers.Tests.dll" /> |
177 | <arg value="-xml=test-results/OpenSim.Framework.Servers.Tests.dll-Results.xml" /> | 230 | <arg value="-xml=test-results/OpenSim.Framework.Servers.Tests.dll-Results.xml" /> |
178 | </exec> | 231 | </exec> |
179 | 232 | ||
180 | <exec program="nunit-console2" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests"> | 233 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests"> |
181 | <arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> | 234 | <arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> |
182 | <arg value="-xml=test-results/OpenSim.Region.ClientStack.LindenUDP.Tests.dll-Results.xml" /> | 235 | <arg value="-xml=test-results/OpenSim.Region.ClientStack.LindenUDP.Tests.dll-Results.xml" /> |
183 | </exec> | 236 | </exec> |
184 | 237 | ||
185 | <exec program="nunit-console2" failonerror="false" resultproperty="testresult.opensim.region.scriptengine.tests"> | 238 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.scriptengine.tests"> |
186 | <arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> | 239 | <arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> |
187 | <arg value="-xml=test-results/OpenSim.Region.ScriptEngine.Tests.dll-Results.xml" /> | 240 | <arg value="-xml=test-results/OpenSim.Region.ScriptEngine.Tests.dll-Results.xml" /> |
188 | </exec> | 241 | </exec> |
189 | 242 | ||
190 | <exec program="nunit-console2" failonerror="false" resultproperty="testresult.opensim.region.coremodules.tests"> | 243 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.coremodules.tests"> |
191 | <arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" /> | 244 | <arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" /> |
192 | <arg value="-xml=test-results/OpenSim.Region.CoreModules.Tests.dll-Results.xml" /> | 245 | <arg value="-xml=test-results/OpenSim.Region.CoreModules.Tests.dll-Results.xml" /> |
193 | </exec> | 246 | </exec> |
194 | 247 | ||
195 | <exec program="nunit-console2" failonerror="false" resultproperty="testresult.opensim.region.framework.tests"> | 248 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.framework.tests"> |
196 | <arg value="./bin/OpenSim.Region.Framework.Tests.dll" /> | 249 | <arg value="./bin/OpenSim.Region.Framework.Tests.dll" /> |
197 | <arg value="-xml=test-results/OpenSim.Region.Framework.Tests.dll-Results.xml" /> | 250 | <arg value="-xml=test-results/OpenSim.Region.Framework.Tests.dll-Results.xml" /> |
198 | </exec> | 251 | </exec> |
199 | 252 | ||
200 | <exec program="nunit-console2" failonerror="false" resultproperty="testresult.opensim.data.sqlite.tests"> | 253 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.sqlite.tests"> |
201 | <arg value="./bin/OpenSim.Data.SQLite.Tests.dll" /> | 254 | <arg value="./bin/OpenSim.Data.SQLite.Tests.dll" /> |
202 | <arg value="-xml=test-results/OpenSim.Data.SQLite.Tests.dll-Results.xml" /> | 255 | <arg value="-xml=test-results/OpenSim.Data.SQLite.Tests.dll-Results.xml" /> |
203 | </exec> | 256 | </exec> |
204 | 257 | ||
205 | <exec program="nunit-console2" failonerror="false" resultproperty="testresult.opensim.data.mysql.tests"> | 258 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.mysql.tests"> |
206 | <arg value="./bin/OpenSim.Data.MySQL.Tests.dll" /> | 259 | <arg value="./bin/OpenSim.Data.MySQL.Tests.dll" /> |
207 | <arg value="-xml=test-results/OpenSim.Data.MySQL.Tests.dll-Results.xml" /> | 260 | <arg value="-xml=test-results/OpenSim.Data.MySQL.Tests.dll-Results.xml" /> |
208 | </exec> | 261 | </exec> |