diff options
author | Justin Clark-Casey (justincc) | 2014-05-27 18:47:25 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-05-27 18:47:42 +0100 |
commit | 5622cf68aad44d710648e63e879e597fd12402f6 (patch) | |
tree | 9db5af7b65d5606d80bf4248577fb14cc0221e77 /OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests | |
parent | Make CompilerTest add same AssemblyResolver as XEngine to see if this solves ... (diff) | |
download | opensim-SC_OLD-5622cf68aad44d710648e63e879e597fd12402f6.zip opensim-SC_OLD-5622cf68aad44d710648e63e879e597fd12402f6.tar.gz opensim-SC_OLD-5622cf68aad44d710648e63e879e597fd12402f6.tar.bz2 opensim-SC_OLD-5622cf68aad44d710648e63e879e597fd12402f6.tar.xz |
In compiler tests, remove the ResolveEventHandlers after test exit
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs index 75b7244..713b280 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs | |||
@@ -49,6 +49,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests | |||
49 | private CSharpCodeProvider m_CSCodeProvider; | 49 | private CSharpCodeProvider m_CSCodeProvider; |
50 | private CompilerParameters m_compilerParameters; | 50 | private CompilerParameters m_compilerParameters; |
51 | private CompilerResults m_compilerResults; | 51 | private CompilerResults m_compilerResults; |
52 | private ResolveEventHandler m_resolveEventHandler; | ||
52 | 53 | ||
53 | /// <summary> | 54 | /// <summary> |
54 | /// Creates a temporary directory where build artifacts are stored. | 55 | /// Creates a temporary directory where build artifacts are stored. |
@@ -70,10 +71,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests | |||
70 | 71 | ||
71 | string rootPath = System.AppDomain.CurrentDomain.BaseDirectory; | 72 | string rootPath = System.AppDomain.CurrentDomain.BaseDirectory; |
72 | 73 | ||
73 | System.AppDomain.CurrentDomain.AssemblyResolve += | 74 | m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve); |
74 | new ResolveEventHandler( | ||
75 | AssemblyResolver.OnAssemblyResolve); | ||
76 | 75 | ||
76 | System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler; | ||
77 | |||
77 | m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); | 78 | m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); |
78 | m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); | 79 | m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); |
79 | m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); | 80 | m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); |
@@ -87,6 +88,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests | |||
87 | [TestFixtureTearDown] | 88 | [TestFixtureTearDown] |
88 | public void CleanUp() | 89 | public void CleanUp() |
89 | { | 90 | { |
91 | System.AppDomain.CurrentDomain.AssemblyResolve -= m_resolveEventHandler; | ||
92 | |||
90 | if (Directory.Exists(m_testDir)) | 93 | if (Directory.Exists(m_testDir)) |
91 | { | 94 | { |
92 | // Blow away the temporary directory with artifacts. | 95 | // Blow away the temporary directory with artifacts. |