diff options
author | Robert Adams | 2015-09-08 04:54:16 -0700 |
---|---|---|
committer | Robert Adams | 2015-09-08 04:54:16 -0700 |
commit | e5367d822be9b05e74c859afe2d2956a3e95aa33 (patch) | |
tree | e904050a30715df587aa527d7f313755177726a7 /OpenSim/Tests/Common | |
parent | add lost admin_reset_land method (diff) | |
parent | Deleted access control spec from [LoginService] section of standalone config.... (diff) | |
download | opensim-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.cs | 2 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 28 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Helpers/UserAccountHelpers.cs | 2 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestScene.cs | 10 | ||||
-rw-r--r-- | OpenSim/Tests/Common/OpenSimTestCase.cs | 2 |
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; | |||
37 | using NUnit.Framework; | 37 | using NUnit.Framework; |
38 | using OpenMetaverse; | 38 | using OpenMetaverse; |
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Framework.Communications; | 40 | |
41 | using OpenSim.Framework.Servers; | 41 | using OpenSim.Framework.Servers; |
42 | using OpenSim.Region.Framework.Interfaces; | 42 | using OpenSim.Region.Framework.Interfaces; |
43 | using OpenSim.Region.Framework.Scenes; | 43 | using 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; | |||
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenSim.Data.Null; | 33 | using OpenSim.Data.Null; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 35 | |
36 | using OpenSim.Framework.Console; | 36 | using OpenSim.Framework.Console; |
37 | using OpenSim.Framework.Servers; | 37 | using OpenSim.Framework.Servers; |
38 | using OpenSim.Framework.Servers.HttpServer; | 38 | using OpenSim.Framework.Servers.HttpServer; |
39 | using OpenSim.Region.Physics.Manager; | 39 | using OpenSim.Region.PhysicsModules.SharedBase; |
40 | using OpenSim.Region.Framework; | 40 | using OpenSim.Region.Framework; |
41 | using OpenSim.Region.Framework.Interfaces; | 41 | using OpenSim.Region.Framework.Interfaces; |
42 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
@@ -48,6 +48,7 @@ using OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory; | |||
48 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid; | 48 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid; |
49 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; | 49 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts; |
50 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence; | 50 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence; |
51 | using OpenSim.Region.PhysicsModule.BasicPhysics; | ||
51 | using OpenSim.Services.Interfaces; | 52 | using OpenSim.Services.Interfaces; |
52 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 53 | using 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 | ||
28 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using OpenMetaverse; | 29 | using OpenMetaverse; |
30 | using OpenSim.Framework.Communications; | 30 | |
31 | using OpenSim.Region.Framework.Scenes; | 31 | using OpenSim.Region.Framework.Scenes; |
32 | using OpenSim.Services.Interfaces; | 32 | using 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 @@ | |||
28 | using System; | 28 | using System; |
29 | using Nini.Config; | 29 | using Nini.Config; |
30 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
31 | using OpenSim.Framework.Communications; | 31 | |
32 | using OpenSim.Framework.Servers; | 32 | using OpenSim.Framework.Servers; |
33 | using OpenSim.Region.Framework; | 33 | using OpenSim.Region.Framework; |
34 | using OpenSim.Region.Framework.Interfaces; | 34 | using OpenSim.Region.Framework.Interfaces; |
35 | using OpenSim.Region.Framework.Scenes; | 35 | using OpenSim.Region.Framework.Scenes; |
36 | using OpenSim.Region.Physics.Manager; | 36 | using OpenSim.Region.PhysicsModules.SharedBase; |
37 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
38 | 38 | ||
39 | namespace OpenSim.Tests.Common | 39 | namespace 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(); |