<?xml version="1.0" ?>
<project name="OpenSim" default="build">
  <setenv name="MONO_THREADS_PER_CPU" value="100" />
  <target name="build">
    <exec program="mono" commandline="../bin/Prebuild.exe /target nant" />
    <nant buildfile="../OpenSim.build" target="build" />
  </target>
  <target name="cibuild">
    <property name="projectdir" value="opensim-0.6.4" />
    <exec program="mono" commandline="bin/Prebuild.exe /target nant" workingdir="../" />
    <nant buildfile="../OpenSim.build" target="clean" />
    <nant buildfile="../OpenSim.build" target="build" />

    <delete dir="../${projectdir}" />
    <copy todir="../${projectdir}">
      <fileset basedir="../">
        <include name="ThirdPartyLicenses/**" />
        <include name="CONTRIBUTORS.txt" />
        <include name="README" />
        <include name="bin/**" />
      </fileset>
    </copy>

    <exec program="svn" commandline="info" workingdir="../" output="../${projectdir}/svn.info" />
    <touch file="../${projectdir}/bin/startup_commands.txt" />

    <!-- Re-create the directory containig test results. -->
    <delete dir="../test-results" />
    <mkdir dir="../test-results" />
  
    <!-- Copy the 64 bit ode library to bin/ for testing. -->
    <copy file="../bin/Physics/OpenSim.Region.Physics.OdePlugin.dll" tofile="../bin/OpenSim.Region.Physics.OdePlugin.dll" />
    

    <!-- Run the tests. -->
    <nunit2 failonerror="false" 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.Communications.Tests.dll"/>
          <include name="../bin/OpenSim.Framework.Servers.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"/>  
          <!-- <include name="../bin/OpenSim.Region.Physics.OdePlugin.dll"/> -->
  

        </assemblies>
      </test>
    </nunit2>

<!--
    <echo message="Generating Doxygen documentation" />
    <exec program="doxygen" workingdir="../doc" commandline="doxygen.conf" />
    <exec program="rsync" workingdir="../doc" commandline="-az - - delete html/ /home/afrisby/public_html/docs/html/" />
-->
 <!-- ensure a clean checkout each time -->
  </target>
</project>