aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/ScriptException.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs10
2 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/ScriptException.cs b/OpenSim/Region/ScriptEngine/Shared/ScriptException.cs
index ae67fc5..f55ba7e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/ScriptException.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/ScriptException.cs
@@ -26,9 +26,11 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Runtime.Serialization;
29 30
30namespace OpenSim.Region.ScriptEngine.Shared 31namespace OpenSim.Region.ScriptEngine.Shared
31{ 32{
33 [Serializable]
32 public class ScriptException : Exception 34 public class ScriptException : Exception
33 { 35 {
34 public ScriptException() : base() {} 36 public ScriptException() : base() {}
@@ -36,5 +38,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
36 public ScriptException(string message) : base(message) {} 38 public ScriptException(string message) : base(message) {}
37 39
38 public ScriptException(string message, Exception innerException) : base(message, innerException) {} 40 public ScriptException(string message, Exception innerException) : base(message, innerException) {}
41
42 public ScriptException(SerializationInfo info, StreamingContext context) :base(info, context) {}
39 } 43 }
40} \ No newline at end of file 44} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs
index f247a0b..f331658 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests
90// log4net.Config.XmlConfigurator.Configure(); 90// log4net.Config.XmlConfigurator.Configure();
91 91
92 UUID userId = TestHelpers.ParseTail(0x1); 92 UUID userId = TestHelpers.ParseTail(0x1);
93// UUID objectId = TestHelpers.ParseTail(0x2); 93// UUID objectId = TestHelpers.ParseTail(0x100);
94// UUID itemId = TestHelpers.ParseTail(0x3); 94// UUID itemId = TestHelpers.ParseTail(0x3);
95 string itemName = "TestStartScript() Item"; 95 string itemName = "TestStartScript() Item";
96 96
@@ -105,12 +105,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests
105 105
106 m_scene.EventManager.OnChatFromWorld += OnChatFromWorld; 106 m_scene.EventManager.OnChatFromWorld += OnChatFromWorld;
107 107
108 m_scene.RezNewScript(userId, itemTemplate); 108 SceneObjectPart partWhereRezzed = m_scene.RezNewScript(userId, itemTemplate);
109 109
110 m_chatEvent.WaitOne(60000); 110 m_chatEvent.WaitOne(60000);
111 111
112 Assert.That(m_osChatMessageReceived, Is.Not.Null, "No chat message received in TestStartScript()"); 112 Assert.That(m_osChatMessageReceived, Is.Not.Null, "No chat message received in TestStartScript()");
113 Assert.That(m_osChatMessageReceived.Message, Is.EqualTo("Script running")); 113 Assert.That(m_osChatMessageReceived.Message, Is.EqualTo("Script running"));
114
115 bool running;
116 TaskInventoryItem scriptItem = partWhereRezzed.Inventory.GetInventoryItem(itemName);
117 Assert.That(
118 SceneObjectPartInventory.TryGetScriptInstanceRunning(m_scene, scriptItem, out running), Is.True);
119 Assert.That(running, Is.True);
114 } 120 }
115 121
116 private void OnChatFromWorld(object sender, OSChatMessage oscm) 122 private void OnChatFromWorld(object sender, OSChatMessage oscm)