Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim
commit
5c2bf97bf2
|
@ -34,51 +34,55 @@
|
|||
<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="false" resultproperty="testresult.opensim.framework.tests">
|
||||
<arg value="./bin/OpenSim.Framework.Tests.dll" />
|
||||
</exec>
|
||||
|
||||
<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" />
|
||||
</exec>
|
||||
|
||||
<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" />
|
||||
</exec>
|
||||
|
||||
<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" />
|
||||
</exec>
|
||||
|
||||
<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" />
|
||||
</exec>
|
||||
|
||||
<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" />
|
||||
</exec>
|
||||
|
||||
<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" />
|
||||
</exec>
|
||||
|
||||
<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" />
|
||||
</exec>
|
||||
|
||||
<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" />
|
||||
</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.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}" />
|
||||
<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.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}" />
|
||||
<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.region.coremodules.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.framework.servers.tests)==0}" />
|
||||
|
||||
</target>
|
||||
|
||||
|
|
14
Makefile
14
Makefile
|
@ -1,4 +1,14 @@
|
|||
NANT = $(shell if test "$$EMACS" = "t" ; then echo "nant"; else echo "./nant-color"; fi)
|
||||
# hey, emacs! this is a -*- makefile -*-
|
||||
#
|
||||
# OpenSim makefile
|
||||
#
|
||||
|
||||
RUBY = $(strip $(shell which ruby 2>/dev/null))
|
||||
ifeq ($(RUBY),)
|
||||
NANT = nant
|
||||
else
|
||||
NANT = $(shell if test "$$EMACS" = "t" ; then echo "nant"; else echo "./nant-color"; fi)
|
||||
endif
|
||||
|
||||
all: prebuild
|
||||
# @export PATH=/usr/local/bin:$(PATH)
|
||||
|
@ -14,7 +24,7 @@ prebuild:
|
|||
|
||||
clean:
|
||||
# @export PATH=/usr/local/bin:$(PATH)
|
||||
${NANT} clean
|
||||
-${NANT} clean
|
||||
|
||||
test: prebuild
|
||||
${NANT} test
|
||||
|
|
|
@ -210,6 +210,7 @@ namespace OpenSim.Data.MSSQL
|
|||
{
|
||||
foreach (SceneObjectPart objectPart in allPrimsWithInventory)
|
||||
{
|
||||
command.Parameters.Clear();
|
||||
command.Parameters.Add(_Database.CreateParameter("@PrimID", objectPart.UUID));
|
||||
|
||||
List<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
|
||||
|
|
|
@ -1169,5 +1169,27 @@ namespace OpenSim.Framework
|
|||
|
||||
return found.ToArray();
|
||||
}
|
||||
|
||||
#region FireAndForget Threading Pattern
|
||||
|
||||
public static void FireAndForget(System.Threading.WaitCallback callback)
|
||||
{
|
||||
callback.BeginInvoke(null, EndFireAndForget, callback);
|
||||
}
|
||||
|
||||
public static void FireAndForget(System.Threading.WaitCallback callback, object obj)
|
||||
{
|
||||
callback.BeginInvoke(obj, EndFireAndForget, callback);
|
||||
}
|
||||
|
||||
private static void EndFireAndForget(IAsyncResult ar)
|
||||
{
|
||||
System.Threading.WaitCallback callback = (System.Threading.WaitCallback)ar.AsyncState;
|
||||
|
||||
callback.EndInvoke(ar);
|
||||
ar.AsyncWaitHandle.Close();
|
||||
}
|
||||
|
||||
#endregion FireAndForget Threading Pattern
|
||||
}
|
||||
}
|
||||
|
|
|
@ -199,6 +199,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
InventoryFolderImpl inventoryFolder = null;
|
||||
InventoryItemBase inventoryItem = null;
|
||||
|
||||
/*
|
||||
if (!m_userInfo.HasReceivedInventory)
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
bool foundStar = false;
|
||||
|
||||
// Eliminate double slashes and any leading / on the path. This might be better done within InventoryFolderImpl
|
||||
// itself (possibly at a small loss in efficiency).
|
||||
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;
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
/// </value>
|
||||
private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
||||
private Scene m_aScene;
|
||||
|
||||
/// <value>
|
||||
/// The comms manager we will use for all comms requests
|
||||
/// </value>
|
||||
|
@ -112,6 +113,28 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
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)
|
||||
{
|
||||
if (m_scenes.Count > 0)
|
||||
|
@ -127,17 +150,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
if (m_scenes.Count > 0)
|
||||
|
@ -153,17 +165,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
}
|
||||
}
|
||||
|
||||
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>
|
||||
/// Load inventory from an inventory file archive
|
||||
/// </summary>
|
||||
|
|
|
@ -272,7 +272,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
|
|||
|
||||
if (asset != null)
|
||||
{
|
||||
handler.BeginInvoke(id, sender, asset, null, null);
|
||||
Util.FireAndForget(delegate { handler(id, sender, asset); });
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
|
|||
|
||||
if (asset != null)
|
||||
{
|
||||
handler.BeginInvoke(id, sender, asset, null, null);
|
||||
Util.FireAndForget(delegate { handler(id, sender, asset); });
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
|
|||
if ((a != null) && (m_Cache != null))
|
||||
m_Cache.Cache(a);
|
||||
|
||||
handler.BeginInvoke(assetID, s, a, null, null);
|
||||
Util.FireAndForget(delegate { handler(assetID, s, a); });
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -457,6 +457,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
void SendInventoryComplete(IAsyncResult iar)
|
||||
{
|
||||
SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState;
|
||||
d.EndInvoke(iar);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -622,6 +624,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
private void PurgeFolderCompleted(IAsyncResult iar)
|
||||
{
|
||||
PurgeFolderDelegate d = (PurgeFolderDelegate)iar.AsyncState;
|
||||
d.EndInvoke(iar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ namespace OpenSim.Services.Connectors
|
|||
}
|
||||
else
|
||||
{
|
||||
handler.BeginInvoke(id, sender, asset, null, null);
|
||||
Util.FireAndForget(delegate { handler(id, sender, asset); });
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -461,6 +461,8 @@ namespace OpenSim.Services.Connectors
|
|||
|
||||
private void MoveItemsCompleted(IAsyncResult iar)
|
||||
{
|
||||
MoveItemsDelegate d = (MoveItemsDelegate)iar.AsyncState;
|
||||
d.EndInvoke(iar);
|
||||
}
|
||||
|
||||
public bool MoveItems(string userID, List<InventoryItemBase> items, UUID sessionID)
|
||||
|
|
|
@ -232,7 +232,7 @@ namespace OpenSim.Services.InventoryService
|
|||
m_log.WarnFormat("[INVENTORY SERVICE]: User {0} inventory not available", userID);
|
||||
}
|
||||
|
||||
callback.BeginInvoke(folders, items, null, null);
|
||||
Util.FireAndForget(delegate { callback(folders, items); });
|
||||
}
|
||||
|
||||
public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
|
||||
|
|
|
@ -90,4 +90,3 @@ project can always be found at http://opensimulator.org.
|
|||
|
||||
Thanks for trying OpenSim, we hope it is a pleasant experience.
|
||||
|
||||
|
||||
|
|
|
@ -135,3 +135,4 @@ nunit-console2 OpenSim.Framework.Tests.dll (on linux)
|
|||
nunit-console OpenSim.Framework.Tests.dll (on windows)
|
||||
|
||||
For more information on testing contact the autor of this testing readme: Daedius Moskvitch ( daedius @@@@ daedius com)
|
||||
|
||||
|
|
|
@ -1 +1,14 @@
|
|||
[Startup]
|
||||
; Set here or use the -user command-line switch
|
||||
;user = Test
|
||||
|
||||
; Set here or use the -host command-line switch
|
||||
;host = localhost
|
||||
|
||||
; Set here or use the -port command-line switch
|
||||
;port = 8003
|
||||
|
||||
; Set here or use the -pass command-line switch
|
||||
; Please be aware that this is not secure since the password is in the clear
|
||||
; we recommend the use of -pass wherever possible
|
||||
;pass = secret
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/ruby
|
||||
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
def main
|
||||
IO.popen("nant #{ARGV.join(' ')}") { |pipe|
|
||||
|
|
Loading…
Reference in New Issue