aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common
diff options
context:
space:
mode:
authorRobert Adams2015-09-08 04:54:16 -0700
committerRobert Adams2015-09-08 04:54:16 -0700
commite5367d822be9b05e74c859afe2d2956a3e95aa33 (patch)
treee904050a30715df587aa527d7f313755177726a7 /OpenSim/Tests/Common
parentadd lost admin_reset_land method (diff)
parentDeleted access control spec from [LoginService] section of standalone config.... (diff)
downloadopensim-SC-e5367d822be9b05e74c859afe2d2956a3e95aa33.zip
opensim-SC-e5367d822be9b05e74c859afe2d2956a3e95aa33.tar.gz
opensim-SC-e5367d822be9b05e74c859afe2d2956a3e95aa33.tar.bz2
opensim-SC-e5367d822be9b05e74c859afe2d2956a3e95aa33.tar.xz
Merge of ubitworkvarnew with opensim/master as of 20150905.
This integrates the OpenSim refactoring to make physics, etc into modules. AVN physics hasn't been moved to new location. Does not compile yet. Merge branch 'osmaster' into mbworknew1
Diffstat (limited to 'OpenSim/Tests/Common')
-rw-r--r--OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs2
-rw-r--r--OpenSim/Tests/Common/Helpers/SceneHelpers.cs28
-rw-r--r--OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs2
-rw-r--r--OpenSim/Tests/Common/Mock/TestScene.cs10
-rw-r--r--OpenSim/Tests/Common/OpenSimTestCase.cs2
5 files changed, 33 insertions, 11 deletions
diff --git a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs
index e6adcf7..1f6233d 100644
--- a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs
@@ -37,7 +37,7 @@ using Nini.Config;
37using NUnit.Framework; 37using NUnit.Framework;
38using OpenMetaverse; 38using OpenMetaverse;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Framework.Communications; 40
41using OpenSim.Framework.Servers; 41using OpenSim.Framework.Servers;
42using OpenSim.Region.Framework.Interfaces; 42using OpenSim.Region.Framework.Interfaces;
43using OpenSim.Region.Framework.Scenes; 43using OpenSim.Region.Framework.Scenes;
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index b368822..5cd5b88 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -32,11 +32,11 @@ using Nini.Config;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Data.Null; 33using OpenSim.Data.Null;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Communications; 35
36using OpenSim.Framework.Console; 36using OpenSim.Framework.Console;
37using OpenSim.Framework.Servers; 37using OpenSim.Framework.Servers;
38using OpenSim.Framework.Servers.HttpServer; 38using OpenSim.Framework.Servers.HttpServer;
39using OpenSim.Region.Physics.Manager; 39using OpenSim.Region.PhysicsModules.SharedBase;
40using OpenSim.Region.Framework; 40using OpenSim.Region.Framework;
41using OpenSim.Region.Framework.Interfaces; 41using OpenSim.Region.Framework.Interfaces;
42using OpenSim.Region.Framework.Scenes; 42using OpenSim.Region.Framework.Scenes;
@@ -48,6 +48,7 @@ using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory;
48using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid; 48using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid;
49using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; 49using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts;
50using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence; 50using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence;
51using OpenSim.Region.PhysicsModule.BasicPhysics;
51using OpenSim.Services.Interfaces; 52using OpenSim.Services.Interfaces;
52using GridRegion = OpenSim.Services.Interfaces.GridRegion; 53using GridRegion = OpenSim.Services.Interfaces.GridRegion;
53 54
@@ -77,6 +78,8 @@ namespace OpenSim.Tests.Common
77 78
78 private CoreAssetCache m_cache; 79 private CoreAssetCache m_cache;
79 80
81 private PhysicsScene m_physicsScene;
82
80 public SceneHelpers() : this(null) {} 83 public SceneHelpers() : this(null) {}
81 84
82 public SceneHelpers(CoreAssetCache cache) 85 public SceneHelpers(CoreAssetCache cache)
@@ -97,6 +100,8 @@ namespace OpenSim.Tests.Common
97 100
98 m_cache = cache; 101 m_cache = cache;
99 102
103 m_physicsScene = StartPhysicsScene();
104
100 SimDataService 105 SimDataService
101 = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null); 106 = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null);
102 } 107 }
@@ -158,12 +163,16 @@ namespace OpenSim.Tests.Common
158 "basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent); 163 "basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent);
159 164
160 TestScene testScene = new TestScene( 165 TestScene testScene = new TestScene(
161 regInfo, m_acm, physicsScene, scs, SimDataService, m_estateDataService, configSource, null); 166 regInfo, m_acm, SimDataService, m_estateDataService, configSource, null);
162 167
163 INonSharedRegionModule godsModule = new GodsModule(); 168 INonSharedRegionModule godsModule = new GodsModule();
164 godsModule.Initialise(new IniConfigSource()); 169 godsModule.Initialise(new IniConfigSource());
165 godsModule.AddRegion(testScene); 170 godsModule.AddRegion(testScene);
166 171
172 // Add scene to physics
173 ((INonSharedRegionModule)m_physicsScene).AddRegion(testScene);
174 ((INonSharedRegionModule)m_physicsScene).RegionLoaded(testScene);
175
167 // Add scene to services 176 // Add scene to services
168 m_assetService.AddRegion(testScene); 177 m_assetService.AddRegion(testScene);
169 178
@@ -330,6 +339,19 @@ namespace OpenSim.Tests.Common
330 return presenceService; 339 return presenceService;
331 } 340 }
332 341
342 private static PhysicsScene StartPhysicsScene()
343 {
344 IConfigSource config = new IniConfigSource();
345 config.AddConfig("Startup");
346 config.Configs["Startup"].Set("physics", "basicphysics");
347
348 PhysicsScene pScene = new BasicScene();
349 INonSharedRegionModule mod = pScene as INonSharedRegionModule;
350 mod.Initialise(config);
351
352 return pScene;
353 }
354
333 /// <summary> 355 /// <summary>
334 /// Setup modules for a scene using their default settings. 356 /// Setup modules for a scene using their default settings.
335 /// </summary> 357 /// </summary>
diff --git a/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs b/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs
index 2fbebc4..c62b58e 100644
--- a/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs
@@ -27,7 +27,7 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using OpenMetaverse; 29using OpenMetaverse;
30using OpenSim.Framework.Communications; 30
31using OpenSim.Region.Framework.Scenes; 31using OpenSim.Region.Framework.Scenes;
32using OpenSim.Services.Interfaces; 32using OpenSim.Services.Interfaces;
33 33
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index 45acf91..1a93c9f 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -28,12 +28,12 @@
28using System; 28using System;
29using Nini.Config; 29using Nini.Config;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Framework.Communications; 31
32using OpenSim.Framework.Servers; 32using OpenSim.Framework.Servers;
33using OpenSim.Region.Framework; 33using OpenSim.Region.Framework;
34using OpenSim.Region.Framework.Interfaces; 34using OpenSim.Region.Framework.Interfaces;
35using OpenSim.Region.Framework.Scenes; 35using OpenSim.Region.Framework.Scenes;
36using OpenSim.Region.Physics.Manager; 36using OpenSim.Region.PhysicsModules.SharedBase;
37using OpenSim.Services.Interfaces; 37using OpenSim.Services.Interfaces;
38 38
39namespace OpenSim.Tests.Common 39namespace OpenSim.Tests.Common
@@ -41,10 +41,10 @@ namespace OpenSim.Tests.Common
41 public class TestScene : Scene 41 public class TestScene : Scene
42 { 42 {
43 public TestScene( 43 public TestScene(
44 RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene, 44 RegionInfo regInfo, AgentCircuitManager authen,
45 SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService, 45 ISimulationDataService simDataService, IEstateDataService estateDataService,
46 IConfigSource config, string simulatorVersion) 46 IConfigSource config, string simulatorVersion)
47 : base(regInfo, authen, physicsScene, sceneGridService, simDataService, estateDataService, 47 : base(regInfo, authen, simDataService, estateDataService,
48 config, simulatorVersion) 48 config, simulatorVersion)
49 { 49 {
50 } 50 }
diff --git a/OpenSim/Tests/Common/OpenSimTestCase.cs b/OpenSim/Tests/Common/OpenSimTestCase.cs
index c1415af..9fea348 100644
--- a/OpenSim/Tests/Common/OpenSimTestCase.cs
+++ b/OpenSim/Tests/Common/OpenSimTestCase.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Tests.Common
38 [SetUp] 38 [SetUp]
39 public virtual void SetUp() 39 public virtual void SetUp()
40 { 40 {
41// TestHelpers.InMethod(); 41 //TestHelpers.InMethod();
42 // Disable logging for each test so that one where logging is enabled doesn't cause all subsequent tests 42 // Disable logging for each test so that one where logging is enabled doesn't cause all subsequent tests
43 // to have logging on if it failed with an exception. 43 // to have logging on if it failed with an exception.
44 TestHelpers.DisableLogging(); 44 TestHelpers.DisableLogging();