Strengthen the tests for the possibility that SetUpFixture does not run in the beginning.

0.9.0-post-fixes
Diva Canto 2017-08-14 16:33:21 -07:00
parent 26a4c5ff85
commit 40f4b30361
3 changed files with 14 additions and 5 deletions

View File

@ -145,12 +145,10 @@
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.services.inventoryservice.tests)==0}" /> <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.services.inventoryservice.tests)==0}" />
<!-- This uses SetUpFixture, which older versions of nant don't seem to understand, so commenting for now
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.tests.permissions"> <exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.tests.permissions">
<arg value="./bin/OpenSim.Tests.Permissions.dll" /> <arg value="./bin/OpenSim.Tests.Permissions.dll" />
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests.permissions)==0}" /> <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests.permissions)==0}" />
-->
<delete dir="%temp%"/> <delete dir="%temp%"/>
</target> </target>
@ -267,12 +265,10 @@
<arg value="-xml=test-results/OpenSim.Services.InventoryService.Tests.dll-Results.xml" /> <arg value="-xml=test-results/OpenSim.Services.InventoryService.Tests.dll-Results.xml" />
</exec> </exec>
<!--
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.tests.permissions"> <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.tests.permissions">
<arg value="./bin/OpenSim.Tests.Permissions.dll" /> <arg value="./bin/OpenSim.Tests.Permissions.dll" />
<arg value="-xml=test-results/OpenSim.Tests.Permissions.dll-Results.xml" /> <arg value="-xml=test-results/OpenSim.Tests.Permissions.dll-Results.xml" />
</exec> </exec>
-->
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests)==0}" /> <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests)==0}" />
<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.tests)==0}" />
@ -285,7 +281,7 @@
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" /> <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.capabilities.handlers.tests)==0}" /> <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.capabilities.handlers.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.services.inventoryservice.tests)==0}" /> <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.services.inventoryservice.tests)==0}" />
<!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests.permissions)==0}" /> --> <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests.permissions)==0}" />
</target> </target>
<target name="doxygen"> <target name="doxygen">

View File

@ -44,6 +44,13 @@ namespace OpenSim.Tests.Permissions
[SetUp] [SetUp]
public void SetUp() public void SetUp()
{ {
// In case we're dealing with some older version of nunit
if (Common.TheInstance == null)
{
Common c = new Common();
c.SetUp();
}
Common.TheInstance.DeleteObjectsFolders(); Common.TheInstance.DeleteObjectsFolders();
} }

View File

@ -46,6 +46,12 @@ namespace OpenSim.Tests.Permissions
[SetUp] [SetUp]
public void SetUp() public void SetUp()
{ {
// In case we're dealing with some older version of nunit
if (Common.TheInstance == null)
{
Common c = new Common();
c.SetUp();
}
Common.TheInstance.DeleteObjectsFolders(); Common.TheInstance.DeleteObjectsFolders();
} }