From 038d1bf742ba4f95ca8a83b27f6fefb755485524 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 7 Feb 2012 17:44:37 +0000
Subject: Add a regression test to compile and start a script. Remove
Path.GetDirectoryName when getting assembly loading path in
Compiler.CompileFromDotNetText().
The Path.GetDirectoryName call in Compiler.CompileFromDotNetText is unnecessary since AppDomain.CurrentDomain.BaseDirectory is always a directory.
Later path concatenation is already done by Path.Combine() which handles any trailing slash.
Removing Path.GetDirectoryName() will not affect the runtime but allows NUnit to work since it doesn't add a trailing slash to AppDomain.CurrentDomain.BaseDirectory.
---
OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Tests/Common/Helpers/SceneHelpers.cs')
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index a25eb66..aa904aa 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -88,9 +88,27 @@ namespace OpenSim.Tests.Common
/// ID of the region
/// X co-ordinate of the region
/// Y co-ordinate of the region
- /// This should be the same if simulating two scenes within a standalone
+ ///
///
- public static TestScene SetupScene(string name, UUID id, uint x, uint y, CoreAssetCache cache)
+ public static TestScene SetupScene(
+ string name, UUID id, uint x, uint y, CoreAssetCache cache)
+ {
+ return SetupScene(name, id, x, y, cache, new IniConfigSource());
+ }
+
+ ///
+ /// Set up a scene. If it's more then one scene, use the same CommunicationsManager to link regions
+ /// or a different, to get a brand new scene with new shared region modules.
+ ///
+ /// Name of the region
+ /// ID of the region
+ /// X co-ordinate of the region
+ /// Y co-ordinate of the region
+ ///
+ ///
+ ///
+ public static TestScene SetupScene(
+ string name, UUID id, uint x, uint y, CoreAssetCache cache, IConfigSource configSource)
{
Console.WriteLine("Setting up test scene {0}", name);
@@ -106,7 +124,6 @@ namespace OpenSim.Tests.Common
ISimulationDataService simDataService = OpenSim.Server.Base.ServerUtils.LoadPlugin("OpenSim.Tests.Common.dll", null);
IEstateDataService estateDataService = null;
- IConfigSource configSource = new IniConfigSource();
TestScene testScene = new TestScene(
regInfo, acm, scs, simDataService, estateDataService, null, false, configSource, null);
--
cgit v1.1