aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.nant/local.include
blob: 2591aba963202bead671037e405a4fbe88702d58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<!-- -*- xml -*- -->
<!-- please leave the top comment for us emacs folks -->
<property name="nunitcmd" value="nunit-console" />

<!-- For safety/laziness sake, we're going to take the approach of deleting known extraneous files here rather than
     trying to copy across only the essential ones -->
<property name="distbindir" value="distbin" />
<target name="distbin">
  <copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
  <delete dir="${distbindir}"/>
  <!-- <copy file="*" todir="${distbindir}"/> -->
  <copy todir="${distbindir}">
    <fileset>
      <include name="**"/>
    </fileset>
  </copy>
  <delete dir="${distbindir}/OpenSim"/>
  <delete dir="${distbindir}/Prebuild"/>
  <delete dir="${distbindir}/%temp%"/>
  <delete dir="${distbindir}/.nant"/>
  <delete>
    <fileset basedir="${distbindir}">
      <include name="Makefile"/>
      <include name="nant-color"/>
      <include name="OpenSim.*"/>
      <include name="prebuild.xml"/>
      <include name="runprebuild*"/>
      <include name="TESTING.txt"/>
      <include name="TestResult.xml"/>
      <include name="bin/OpenSim.Server.ini"/>
      <include name="bin/Regions/*"/>
      <include name="bin/*.db"/>
      <include name="**/.git/**"/>
      <include name=".gitignore"/>
      <include name=".hgignore"/>
    </fileset>
  </delete>
  
</target>

<!-- I don't think these targets are being actively used.  But just in case, we'll just comment them out for now - justincc -->
<!--
<property name="projectdir" value="opensim-0.6.9" />
<target name="dist" depends="distdir">
    <zip zipfile="${projectdir}.zip">
    <fileset basedir=".">
        <include name="${projectdir}/**" />
    </fileset>
    </zip>
    <tar destfile="${projectdir}.tar.gz" compression="GZip">
    <fileset basedir=".">
        <include name="${projectdir}/**" />
    </fileset>
    </tar>
</target>

<target name="distdir">
   <delete dir="${projectdir}" />
   <copy todir="${projectdir}">
       <fileset basedir=".">
          <include name="ThirdPartyLicenses/**" />
          <include name="CONTRIBUTORS.txt" />
          <include name="README" />
          <include name="OpenSim/**/*.cs" />
          <include name="**/*.build" />
          <include name="**/*.csproj" />
          <include name="**/*.csproj.user" />
          <include name="**/*.sln" />
          <include name="bin/*.dll" />
          <include name="bin/*.so" />
          <include name="bin/*.config" />
          <include name="bin/assets/**" />
          <include name="bin/data/**" />
          <include name="bin/OpenSim*xml" />
          <include name="bin/OpenSim.ini" />
          <include name="bin/defaultstripe.png" />
          <exclude name="bin/OpenSim.*dll" />
       </fileset>
   </copy>
   <touch file="${projectdir}/bin/startup_commands.txt" />
</target>
-->

<target name="test" depends="build, find-nunit">
  <setenv name="MONO_THREADS_PER_CPU" value="100" />

  <!-- Unit Test Assembly -->
  <!-- if you want to add more unit tests it's important that you add
  the assembly here as an exec, and you add the fail clause later.
  This lets all the unit tests run and tells you if they fail at the
  end, instead of stopping short -->
  <exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.framework.tests">
    <arg value="./bin/OpenSim.Framework.Tests.dll" />
  </exec>
  <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.tests)==0}" /> 

  <exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.framework.servers.tests">
    <arg value="./bin/OpenSim.Framework.Servers.Tests.dll" />
  </exec>
  <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.servers.tests)==0}" /> 

  <exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.framework.serialization.tests">
    <arg value="./bin/OpenSim.Framework.Serialization.Tests.dll" />
  </exec>
  <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.serialization.tests)==0}" /> 

<!--
  <exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests">
    <arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
  </exec>
  <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" /> 
-->

  <exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.scriptengine.tests">
    <arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" />
  </exec>
  <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" /> 

  <exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.coremodules.tests">
    <arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" />
  </exec>
  <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" /> 

  <exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.framework.tests">
    <arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
  </exec>
  <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" /> 

  <exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.data.sqlite.tests">
    <arg value="./bin/OpenSim.Data.SQLite.Tests.dll" />
  </exec>
  <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.sqlite.tests)==0}" /> 

  <exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.data.mysql.tests">
    <arg value="./bin/OpenSim.Data.MySQL.Tests.dll" />
  </exec>
  <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.mysql.tests)==0}" /> 

  <delete dir="%temp%"/>

</target>

<target name="test-cov" depends="build">
    <!-- Code Coverage Test. Prototype, only works with mono 1.2. Instructions in http://opensimulator.org/wiki/Automated_Testing -->
    <mkdir dir="cov" failonerror="false" />
    <exec program="mono">
      <arg value="--debug" />
      <arg value="--profile=monocov:outfile=./cov/OpenSim.Framework.Servers.cov,+[OpenSim.Framework.Servers]" />
      <arg value="/usr/lib/nunit/nunit-console.exe" />
      <arg value="./bin/OpenSim.Framework.Servers.Tests.dll" />
    </exec>
    <delete dir="./cov/OpenSim.Framework.Servers" />
    <exec program="monocov">
      <arg value="--export-html=./cov/OpenSim.Framework.Servers ./cov/OpenSim.Framework.Servers.cov" />
    </exec>

<!--
    <exec program="mono">
      <arg value="&#45;&#45;debug" />
      <arg value="&#45;&#45;profile=monocov:outfile=./cov/OpenSim.Region.ClientStack.LindenUDP.cov,+[OpenSim.Region.ClientStack.LindenUDP]" />
      <arg value="/usr/lib/nunit/nunit-console.exe" />
     <arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
    </exec>
    <delete dir="./cov/OpenSim.Region.ClientStack.LindenUDP" />
    <exec program="monocov">
      <arg value="&#45;&#45;export-html=./cov/OpenSim.Region.ClientStack.LindenUDP ./cov/OpenSim.Region.ClientStack.LindenUDP.cov" />
    </exec>
-->
    
    <exec program="mono">
      <arg value="--debug" />
      <arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ScriptEngine.Shared.cov,+[OpenSim.Region.ScriptEngine.Shared]" />
      <arg value="/usr/lib/nunit/nunit-console.exe" />
      <arg value="./bin/OpenSim.Region.ScriptEngine.Shared.Tests.dll" />
    </exec>
    <delete dir="./cov/OpenSim.Region.ScriptEngine.Shared" />
    <exec program="monocov">      
      <arg value="--export-html=./cov/OpenSim.Region.ScriptEngine.Shared ./cov/OpenSim.Region.ScriptEngine.Shared.cov" />
    </exec>    
    
    <exec program="mono">
      <arg value="--debug" />
      <arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools.cov,+[OpenSim.Region.ScriptEngine.Shared.CodeTools]" />
      <arg value="/usr/lib/nunit/nunit-console.exe" />
      <arg value="./bin/OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests.dll" />
    </exec>
    <delete dir="./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools" />
    <exec program="monocov">
      <arg value="--export-html=./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools ./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools.cov" />
    </exec>    
    
    <exec program="mono">
      <arg value="--debug" />
      <arg value="--profile=monocov:outfile=./cov/OpenSim.Region.CoreModules.cov,+[OpenSim.Region.CoreModules]" />
      <arg value="/usr/lib/nunit/nunit-console.exe" />
      <arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" />
    </exec>
    <delete dir="./cov/OpenSim.Region.CoreModules" />
    <exec program="monocov">
      <arg value="--export-html=./cov/OpenSim.Region.CoreModules ./cov/OpenSim.Region.CoreModules.cov" />
    </exec>    

    <exec program="mono">
      <arg value="--debug" />
      <arg value="--profile=monocov:outfile=./cov/OpenSim.Region.Framework.cov,+[OpenSim.Region.Framework]" />
      <arg value="/usr/lib/nunit/nunit-console.exe" />
      <arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
    </exec>
    <delete dir="./cov/OpenSim.Region.Framework" />
    <exec program="monocov">
      <arg value="--export-html=./cov/OpenSim.Region.Framework ./cov/OpenSim.Region.Framework.cov" />
    </exec>    
    
    <exec program="mono">
      <arg value="--debug" />
      <arg value="--profile=monocov:outfile=./cov/OpenSim.Data.SQLite.cov,+[OpenSim.Data.SQLite]" />
      <arg value="/usr/lib/nunit/nunit-console.exe" />
      <arg value="./bin/OpenSim.Data.SQLite.Tests.dll" />
    </exec>
    <delete dir="./cov/OpenSim.Data.SQLite" />
    <exec program="monocov">
      <arg value="--export-html=./cov/OpenSim.Data.SQLite ./cov/OpenSim.Data.SQLite.cov" />
    </exec>    
    
    <exec program="mono">
      <arg value="--debug" />
      <arg value="--profile=monocov:outfile=./cov/OpenSim.Data.MySQL.cov,+[OpenSim.Data.MySQL.Tests]" />
      <arg value="/usr/lib/nunit/nunit-console.exe" />
      <arg value="./bin/OpenSim.Data.MySQL.Tests.dll" />
    </exec>  
    <delete dir="./cov/OpenSim.Data.MySQL" />
    <exec program="monocov">
      <arg value="--export-html=./cov/OpenSim.Data.MySQL ./cov/OpenSim.Data.MySQL.cov" />
    </exec>     

    <delete file="C:\NUnitPrimaryTrace.txt" failonerror="false" />
    <delete file="TestResult.xml" failonerror="false" />

</target>

<target name="find-nunit">
  <exec program="which" failonerror="false"
        resultproperty="hasnunit2">
    <arg value="nunit-console2" />
  </exec>

  <property name="nunitcmd" value="nunit-console2"
    if="${int::parse(hasnunit2)==0}" />
  <property name="nunitcmd" value="nunit-console"
    if="${int::parse(hasnunit2)==1}" />

</target>

<!-- this is used for panda test execution -->
<!-- work in progress -->

<target name="test-xml" depends="build, find-nunit">
  

  <mkdir dir="test-results" failonerror="false" />
  <!-- Unit Test Assembly -->
  <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.tests">
    <arg value="./bin/OpenSim.Framework.Tests.dll" />
    <arg value="-xml=test-results/OpenSim.Framework.Tests.dll-Results.xml" />
  </exec>

 <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.serialization.tests">
    <arg value="./bin/OpenSim.Framework.Serialization.Tests.dll" />
    <arg value="-xml=test-results/OpenSim.Framework.Serialization.Tests.dll-Results.xml" />
  </exec>

 <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.servers.tests">
    <arg value="./bin/OpenSim.Framework.Servers.Tests.dll" />
    <arg value="-xml=test-results/OpenSim.Framework.Servers.Tests.dll-Results.xml" />
  </exec>

<!--
 <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests">
    <arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
    <arg value="-xml=test-results/OpenSim.Region.ClientStack.LindenUDP.Tests.dll-Results.xml" />
  </exec>
-->

 <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.scriptengine.tests">
    <arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" />
    <arg value="-xml=test-results/OpenSim.Region.ScriptEngine.Tests.dll-Results.xml" />
  </exec>

 <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.coremodules.tests">
    <arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" />
    <arg value="-xml=test-results/OpenSim.Region.CoreModules.Tests.dll-Results.xml" />
  </exec>

 <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.framework.tests">
    <arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
    <arg value="-xml=test-results/OpenSim.Region.Framework.Tests.dll-Results.xml" />
  </exec>

 <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.sqlite.tests">
    <arg value="./bin/OpenSim.Data.SQLite.Tests.dll" />
    <arg value="-xml=test-results/OpenSim.Data.SQLite.Tests.dll-Results.xml" />
  </exec>

 <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.mysql.tests">
    <arg value="./bin/OpenSim.Data.MySQL.Tests.dll" />
    <arg value="-xml=test-results/OpenSim.Data.MySQL.Tests.dll-Results.xml" />
  </exec>

 <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.tests)==0}" /> 
 <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.servers.tests)==0}" /> 
<!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" /> -->
 <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" /> 
 <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" /> 
 <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" /> 
 <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.sqlite.tests)==0}" /> 
 <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.mysql.tests)==0}" /> 

</target>
<!--     <exec program="nunit-console.exe" failonerror="false" resultproperty="testresult.acceptancetestassembly"> -->
<!--         <arg value="AcceptanceTestAssembly.dll" /> -->
<!--         <arg value="/xml=AcceptanceTestAssembly-Results.xml" /> -->
<!--     </exec> -->

<!--     <fail message="Failures reported in unit tests." unless="${int::parse(testresult.unittestassembly)==0}" /> -->
<!--     <fail message="Failures reported in acceptance tests." unless="${int::parse(testresult.acceptancetestassembly)==0}" /> -->
<!-- </target> -->



<!--       <nunit2 failonerror="true" verbose="true"> -->
<!--       <formatter type="Xml" usefile="true" extension=".xml" outputdir="./test-results" /> -->
<!--       <test> -->
<!--         <assemblies> -->
<!--           <include name="./bin/OpenSim.Framework.Tests.dll" /> -->
<!--           <include name="./bin/OpenSim.Framework.Servers.Tests.dll" /> -->
<!--           <include name="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> -->
<!--           <include name="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> -->
<!--           <include name="./bin/OpenSim.Region.CoreModules.Tests.dll" /> -->
<!--           <include name="./bin/OpenSim.Region.Framework.Tests.dll" /> -->
<!--           <include name="./bin/OpenSim.Data.SQLite.Tests.dll" /> -->
<!--           <include name="./bin/OpenSim.Data.MySQL.Tests.dll" /> -->
<!--         </assemblies> -->
<!--       </test> -->
<!--     </nunit2> -->
<!-- </target> -->

<target name="doxygen">
  <exec program="doxygen" workingdir="doc" commandline="doxygen.conf" />
</target>