If a test dll fails, stop immediately rather than trying all the other test dlls

This is very useful behaviour if debugging test failures otherwise it's hard to pick out the test output
Also, some minor method shuffling in the iar module
remotes/origin/0.6.7-post-fixes
Justin Clark-Casey (justincc) 2009-09-03 19:41:38 +01:00
parent 87ec14c5dc
commit 64fa23df7c
3 changed files with 47 additions and 44 deletions

View File

@ -37,48 +37,47 @@
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.tests"> <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.tests">
<arg value="./bin/OpenSim.Framework.Tests.dll" /> <arg value="./bin/OpenSim.Framework.Tests.dll" />
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.tests)==0}" />
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.communications.tests"> <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.communications.tests">
<arg value="./bin/OpenSim.Framework.Communications.Tests.dll" /> <arg value="./bin/OpenSim.Framework.Communications.Tests.dll" />
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.communications.tests)==0}" />
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.servers.tests"> <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.servers.tests">
<arg value="./bin/OpenSim.Framework.Servers.Tests.dll" /> <arg value="./bin/OpenSim.Framework.Servers.Tests.dll" />
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.servers.tests)==0}" />
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests"> <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests">
<arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> <arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" />
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.scriptengine.tests"> <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.scriptengine.tests">
<arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> <arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" />
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" />
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.coremodules.tests"> <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.coremodules.tests">
<arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" /> <arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" />
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" />
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.framework.tests"> <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.framework.tests">
<arg value="./bin/OpenSim.Region.Framework.Tests.dll" /> <arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" />
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.sqlite.tests"> <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.sqlite.tests">
<arg value="./bin/OpenSim.Data.SQLite.Tests.dll" /> <arg value="./bin/OpenSim.Data.SQLite.Tests.dll" />
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.sqlite.tests)==0}" />
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.mysql.tests"> <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.mysql.tests">
<arg value="./bin/OpenSim.Data.MySQL.Tests.dll" /> <arg value="./bin/OpenSim.Data.MySQL.Tests.dll" />
</exec> </exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.mysql.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.communications.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> </target>

View File

@ -199,6 +199,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
InventoryFolderImpl inventoryFolder = null; InventoryFolderImpl inventoryFolder = null;
InventoryItemBase inventoryItem = null; InventoryItemBase inventoryItem = null;
/*
if (!m_userInfo.HasReceivedInventory) if (!m_userInfo.HasReceivedInventory)
{ {
// If the region server has access to the user admin service (by which users are created), // If the region server has access to the user admin service (by which users are created),
@ -220,13 +221,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_userInfo.FetchInventory(); m_userInfo.FetchInventory();
} }
} }
*/
bool foundStar = false; bool foundStar = false;
// Eliminate double slashes and any leading / on the path. This might be better done within InventoryFolderImpl // Eliminate double slashes and any leading / on the path. This might be better done within InventoryFolderImpl
// itself (possibly at a small loss in efficiency). // itself (possibly at a small loss in efficiency).
string[] components string[] components
= m_invPath.Split(new string[] { InventoryFolderImpl.PATH_DELIMITER }, StringSplitOptions.RemoveEmptyEntries); = m_invPath.Split(
new string[] { InventoryFolderImpl.PATH_DELIMITER }, StringSplitOptions.RemoveEmptyEntries);
int maxComponentIndex = components.Length - 1; int maxComponentIndex = components.Length - 1;

View File

@ -64,6 +64,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
/// </value> /// </value>
private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
private Scene m_aScene; private Scene m_aScene;
/// <value> /// <value>
/// The comms manager we will use for all comms requests /// The comms manager we will use for all comms requests
/// </value> /// </value>
@ -110,8 +111,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
InventoryArchiveSaved handlerInventoryArchiveSaved = OnInventoryArchiveSaved; InventoryArchiveSaved handlerInventoryArchiveSaved = OnInventoryArchiveSaved;
if (handlerInventoryArchiveSaved != null) if (handlerInventoryArchiveSaved != null)
handlerInventoryArchiveSaved(succeeded, userInfo, invPath, saveStream, reportedException); handlerInventoryArchiveSaved(succeeded, userInfo, invPath, saveStream, reportedException);
}
public void ArchiveInventory(string firstName, string lastName, string invPath, Stream saveStream)
{
if (m_scenes.Count > 0)
{
CachedUserInfo userInfo = GetUserInfo(firstName, lastName);
if (userInfo != null)
new InventoryArchiveWriteRequest(this, userInfo, invPath, saveStream).Execute();
}
} }
public void ArchiveInventory(string firstName, string lastName, string invPath, string savePath)
{
if (m_scenes.Count > 0)
{
CachedUserInfo userInfo = GetUserInfo(firstName, lastName);
if (userInfo != null)
new InventoryArchiveWriteRequest(this, userInfo, invPath, savePath).Execute();
}
}
public void DearchiveInventory(string firstName, string lastName, string invPath, Stream loadStream) public void DearchiveInventory(string firstName, string lastName, string invPath, Stream loadStream)
{ {
if (m_scenes.Count > 0) if (m_scenes.Count > 0)
@ -125,18 +148,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
UpdateClientWithLoadedNodes(userInfo, request.Execute()); UpdateClientWithLoadedNodes(userInfo, request.Execute());
} }
} }
} }
public void ArchiveInventory(string firstName, string lastName, string invPath, Stream saveStream)
{
if (m_scenes.Count > 0)
{
CachedUserInfo userInfo = GetUserInfo(firstName, lastName);
if (userInfo != null)
new InventoryArchiveWriteRequest(this, userInfo, invPath, saveStream).Execute();
}
}
public void DearchiveInventory(string firstName, string lastName, string invPath, string loadPath) public void DearchiveInventory(string firstName, string lastName, string invPath, string loadPath)
{ {
@ -151,18 +163,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
UpdateClientWithLoadedNodes(userInfo, request.Execute()); UpdateClientWithLoadedNodes(userInfo, request.Execute());
} }
} }
} }
public void ArchiveInventory(string firstName, string lastName, string invPath, string savePath)
{
if (m_scenes.Count > 0)
{
CachedUserInfo userInfo = GetUserInfo(firstName, lastName);
if (userInfo != null)
new InventoryArchiveWriteRequest(this, userInfo, invPath, savePath).Execute();
}
}
/// <summary> /// <summary>
/// Load inventory from an inventory file archive /// Load inventory from an inventory file archive