diff options
author | Justin Clark-Casey (justincc) | 2012-02-07 17:44:37 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-02-07 17:44:37 +0000 |
commit | 038d1bf742ba4f95ca8a83b27f6fefb755485524 (patch) | |
tree | ec03beab5a4c0a3afd75b685d629f9d82d4199b9 /OpenSim/Tests/Common | |
parent | Revert my two quick fixes for the lag issue and put in the real fix, which (diff) | |
download | opensim-SC_OLD-038d1bf742ba4f95ca8a83b27f6fefb755485524.zip opensim-SC_OLD-038d1bf742ba4f95ca8a83b27f6fefb755485524.tar.gz opensim-SC_OLD-038d1bf742ba4f95ca8a83b27f6fefb755485524.tar.bz2 opensim-SC_OLD-038d1bf742ba4f95ca8a83b27f6fefb755485524.tar.xz |
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.
Diffstat (limited to 'OpenSim/Tests/Common')
-rw-r--r-- | OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 23 |
1 files changed, 20 insertions, 3 deletions
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 | |||
88 | /// <param name="id">ID of the region</param> | 88 | /// <param name="id">ID of the region</param> |
89 | /// <param name="x">X co-ordinate of the region</param> | 89 | /// <param name="x">X co-ordinate of the region</param> |
90 | /// <param name="y">Y co-ordinate of the region</param> | 90 | /// <param name="y">Y co-ordinate of the region</param> |
91 | /// <param name="cm">This should be the same if simulating two scenes within a standalone</param> | 91 | /// <param name="cache"></param> |
92 | /// <returns></returns> | 92 | /// <returns></returns> |
93 | public static TestScene SetupScene(string name, UUID id, uint x, uint y, CoreAssetCache cache) | 93 | public static TestScene SetupScene( |
94 | string name, UUID id, uint x, uint y, CoreAssetCache cache) | ||
95 | { | ||
96 | return SetupScene(name, id, x, y, cache, new IniConfigSource()); | ||
97 | } | ||
98 | |||
99 | /// <summary> | ||
100 | /// Set up a scene. If it's more then one scene, use the same CommunicationsManager to link regions | ||
101 | /// or a different, to get a brand new scene with new shared region modules. | ||
102 | /// </summary> | ||
103 | /// <param name="name">Name of the region</param> | ||
104 | /// <param name="id">ID of the region</param> | ||
105 | /// <param name="x">X co-ordinate of the region</param> | ||
106 | /// <param name="y">Y co-ordinate of the region</param> | ||
107 | /// <param name="cache"></param> | ||
108 | /// <param name="configSource"></param> | ||
109 | /// <returns></returns> | ||
110 | public static TestScene SetupScene( | ||
111 | string name, UUID id, uint x, uint y, CoreAssetCache cache, IConfigSource configSource) | ||
94 | { | 112 | { |
95 | Console.WriteLine("Setting up test scene {0}", name); | 113 | Console.WriteLine("Setting up test scene {0}", name); |
96 | 114 | ||
@@ -106,7 +124,6 @@ namespace OpenSim.Tests.Common | |||
106 | 124 | ||
107 | ISimulationDataService simDataService = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null); | 125 | ISimulationDataService simDataService = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null); |
108 | IEstateDataService estateDataService = null; | 126 | IEstateDataService estateDataService = null; |
109 | IConfigSource configSource = new IniConfigSource(); | ||
110 | 127 | ||
111 | TestScene testScene = new TestScene( | 128 | TestScene testScene = new TestScene( |
112 | regInfo, acm, scs, simDataService, estateDataService, null, false, configSource, null); | 129 | regInfo, acm, scs, simDataService, estateDataService, null, false, configSource, null); |