From a568f06b7faea807149205d0e47454e4883e4836 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Thu, 6 Aug 2015 09:54:20 +0300 Subject: When scripts are sleeping, don't count that as execution time Sleeping doesn't use the CPU. --- .../ScriptEngine/Shared/Tests/LSL_ApiAvatarTests.cs | 2 +- .../Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs | 2 +- .../ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs | 12 ++++++------ .../ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs | 6 +++--- .../Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs | 2 +- .../ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs | 2 +- .../ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs | 4 ++-- OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs | 2 +- .../Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs | 2 +- .../ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs | 4 ++-- .../ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs | 12 ++++++------ .../Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs | 16 ++++++++-------- 12 files changed, 33 insertions(+), 33 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Tests') diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiAvatarTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiAvatarTests.cs index 8170e9b..06494b0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiAvatarTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiAvatarTests.cs @@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests part.RotationOffset = new Quaternion(0.7071068f, 0, 0, 0.7071068f); LSL_Api apiGrp1 = new LSL_Api(); - apiGrp1.Initialize(m_engine, part, null, null); + apiGrp1.Initialize(m_engine, part, null, null, null); ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs index e35de9c..c3672d8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs @@ -105,7 +105,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // This is disconnected from the actual script - the mock engine does not set up any LSL_Api atm. // Possibly this could be done and we could obtain it directly from the MockScriptEngine. m_lslApi = new LSL_Api(); - m_lslApi.Initialize(m_engine, so.RootPart, m_scriptItem, null); + m_lslApi.Initialize(m_engine, so.RootPart, m_scriptItem, null, null); } [TearDown] diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs index 3ff4c6b..96e0356 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs @@ -94,7 +94,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, userId); LSL_Api api = new LSL_Api(); - api.Initialize(m_engine, so1.RootPart, null, null); + api.Initialize(m_engine, so1.RootPart, null, null, null); // Create a second object SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, userId, "so2", 0x100); @@ -127,7 +127,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, user1Id, "so1", 0x10); m_scene.AddSceneObject(so1); LSL_Api api = new LSL_Api(); - api.Initialize(m_engine, so1.RootPart, null, null); + api.Initialize(m_engine, so1.RootPart, null, null, null); // Create an object embedded inside the first UUID itemId = TestHelpers.ParseTail(0x20); @@ -137,7 +137,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, user2Id, "so2", 0x100); m_scene.AddSceneObject(so2); LSL_Api api2 = new LSL_Api(); - api2.Initialize(m_engine, so2.RootPart, null, null); + api2.Initialize(m_engine, so2.RootPart, null, null, null); // *** Firstly, we test where llAllowInventoryDrop() has not been called. *** api.llGiveInventory(so2.UUID.ToString(), inventoryItemName); @@ -184,7 +184,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, user1Id, "so1", 0x10); m_scene.AddSceneObject(so1); LSL_Api api = new LSL_Api(); - api.Initialize(m_engine, so1.RootPart, null, null); + api.Initialize(m_engine, so1.RootPart, null, null, null); // Create an object embedded inside the first UUID itemId = TestHelpers.ParseTail(0x20); @@ -218,7 +218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, user1Id, "so1", 0x10); m_scene.AddSceneObject(so1); LSL_Api api = new LSL_Api(); - api.Initialize(m_engine, so1.RootPart, null, null); + api.Initialize(m_engine, so1.RootPart, null, null, null); // Create an object embedded inside the first UUID itemId = TestHelpers.ParseTail(0x20); @@ -250,7 +250,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests SceneObjectGroup sourceSo = SceneHelpers.AddSceneObject(m_scene, "sourceSo", user1Id); m_scene.AddSceneObject(sourceSo); LSL_Api api = new LSL_Api(); - api.Initialize(m_engine, sourceSo.RootPart, null, null); + api.Initialize(m_engine, sourceSo.RootPart, null, null, null); TaskInventoryHelpers.AddScript(m_scene.AssetService, sourceSo.RootPart, "script", "Hello World"); SceneObjectGroup targetSo = SceneHelpers.AddSceneObject(m_scene, "targetSo", user1Id); diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs index b6f5e09..4323be0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs @@ -104,7 +104,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(grp2); LSL_Api apiGrp1 = new LSL_Api(); - apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item, null); + apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item, null, null); apiGrp1.llCreateLink(grp2.UUID.ToString(), ScriptBaseClass.TRUE); @@ -131,7 +131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; LSL_Api apiGrp1 = new LSL_Api(); - apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item, null); + apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item, null, null); apiGrp1.llBreakLink(2); @@ -160,7 +160,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; LSL_Api apiGrp1 = new LSL_Api(); - apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item, null); + apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item, null, null); apiGrp1.llBreakAllLinks(); diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs index 0b1ae60..6bbc7bb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs @@ -67,7 +67,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests engine.AddRegion(scene); m_lslApi = new LSL_Api(); - m_lslApi.Initialize(engine, part, null, null); + m_lslApi.Initialize(engine, part, null, null, null); } [Test] diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs index 2ac12cb..97d79e7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs @@ -66,7 +66,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // This is disconnected from the actual script - the mock engine does not set up any LSL_Api atm. // Possibly this could be done and we could obtain it directly from the MockScriptEngine. m_lslApi = new LSL_Api(); - m_lslApi.Initialize(m_engine, m_so.RootPart, m_scriptItem, null); + m_lslApi.Initialize(m_engine, m_so.RootPart, m_scriptItem, null, null); } [Test] diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs index caf2b05..b644814 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs @@ -89,7 +89,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(grp1); LSL_Api apiGrp1 = new LSL_Api(); - apiGrp1.Initialize(m_engine, grp1.RootPart, null, null); + apiGrp1.Initialize(m_engine, grp1.RootPart, null, null, null); // Check simple 1 prim case { @@ -167,7 +167,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part1), false), Is.True); LSL_Api apiGrp1 = new LSL_Api(); - apiGrp1.Initialize(m_engine, part1, null, null); + apiGrp1.Initialize(m_engine, part1, null, null, null); // Note that prim hollow check is passed with the other prim params in order to allow the // specification of a different check value from the prim param. A cylinder, prism, sphere, diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs index 1b7aa63..f9907b6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs @@ -65,7 +65,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests engine.AddRegion(scene); m_lslApi = new LSL_Api(); - m_lslApi.Initialize(engine, part, null, null); + m_lslApi.Initialize(engine, part, null, null, null); } [Test] diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs index 40082b5..e2546ad 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs @@ -71,7 +71,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, part); LSL_Api apiGrp1 = new LSL_Api(); - apiGrp1.Initialize(m_engine, part, scriptItem, null); + apiGrp1.Initialize(m_engine, part, scriptItem, null, null); // Initially long timeout to test cache apiGrp1.LlRequestAgentDataCacheTimeoutMs = 20000; diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs index 4c31969..f452646 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs @@ -93,7 +93,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(so); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, part, null, null); + osslApi.Initialize(m_engine, part, null, null, null); string notecardName = "appearanceNc"; @@ -134,7 +134,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(so); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, part, null, null); + osslApi.Initialize(m_engine, part, null, null, null); string notecardName = "appearanceNc"; diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs index 2fe558a..418f168 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs @@ -98,9 +98,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, inWorldObj.RootPart); - new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); + new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null, null); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); + osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem, null, null); // SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, ua1.PrincipalID); @@ -144,9 +144,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, inWorldObj.RootPart); - new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); + new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null, null); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); + osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem, null, null); // Create an object embedded inside the first TaskInventoryHelpers.AddNotecard( @@ -192,9 +192,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, inWorldObj.RootPart); - new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); + new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null, null); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); + osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem, null, null); // Create an object embedded inside the first TaskInventoryHelpers.AddSceneObject( diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs index 398ccbe..2b7d70e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs @@ -99,7 +99,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(so); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, part, null, null); + osslApi.Initialize(m_engine, part, null, null, null); string notecardName = "appearanceNc"; osslApi.osOwnerSaveAppearance(notecardName); @@ -125,7 +125,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(so); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, so.RootPart, null, null); + osslApi.Initialize(m_engine, so.RootPart, null, null, null); bool gotExpectedException = false; try @@ -160,7 +160,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(so); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, part, null, null); + osslApi.Initialize(m_engine, part, null, null, null); string notecardName = "appearanceNc"; osslApi.osOwnerSaveAppearance(notecardName); @@ -195,7 +195,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(so); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, part, null, null); + osslApi.Initialize(m_engine, part, null, null, null); osslApi.osOwnerSaveAppearance(firstAppearanceNcName); @@ -233,7 +233,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(so); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, part, null, null); + osslApi.Initialize(m_engine, part, null, null, null); osslApi.osOwnerSaveAppearance(firstAppearanceNcName); @@ -285,10 +285,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(otherSo); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, part, null, null); + osslApi.Initialize(m_engine, part, null, null, null); OSSL_Api otherOsslApi = new OSSL_Api(); - otherOsslApi.Initialize(m_engine, otherPart, null, null); + otherOsslApi.Initialize(m_engine, otherPart, null, null, null); string notecardName = "appearanceNc"; osslApi.osOwnerSaveAppearance(notecardName); @@ -332,7 +332,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests m_scene.AddSceneObject(so); OSSL_Api osslApi = new OSSL_Api(); - osslApi.Initialize(m_engine, part, null, null); + osslApi.Initialize(m_engine, part, null, null, null); string notecardName = "appearanceNc"; osslApi.osOwnerSaveAppearance(notecardName); -- cgit v1.1