[mono/monodevelop] dc227b8c: [Debugger] Fix tests to use correspondent runtime.
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <00000141efe65f8c-8f2ac489-94ad-41e1-b7a0-3ba1039760a3-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/monodevelop
Compare: https://github.com/mono/monodevelop/compare/6c89bb46d4cb...dc227b8c6495
Commit: dc227b8c6495c8e3d643fa2d0d4c863eeba415c7
Author: Therzok <[email protected]> (Therzok)
Date: 2013-10-25 13:54:35 GMT
URL: https://github.com/mono/monodevelop/commit/dc227b8c6495c8e3d643fa2d0d4c863eeba415c7
[Debugger] Fix tests to use correspondent runtime.
Changed paths:
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/CorEvaluationTests.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/CorStackFrameTests.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/DebugTests.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs
M main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/StackFrameTests.cs
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/CorEvaluationTests.cs
===================================================================
@@ -29,6 +29,7 @@
namespace MonoDevelop.Debugger.Tests.Win32
{
[TestFixture]
+ [Platform (Include = "Win")]
public class CorEvaluationTests: EvaluationTests
{
public CorEvaluationTests (): base ("MonoDevelop.Debugger.Win32")
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/CorStackFrameTests.cs
===================================================================
@@ -28,6 +28,7 @@
namespace MonoDevelop.Debugger.Tests.Win32
{
[TestFixture]
+ [Platform (Include = "Win")]
public class CorStackFrameTests : StackFrameTests
{
public CorStackFrameTests (): base ("MonoDevelop.Debugger.Win32")
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/DebugTests.cs
===================================================================
@@ -32,24 +32,25 @@
using System.IO;
using System.Threading;
using MonoDevelop.Projects.Text;
+using MonoDevelop.Core.Assemblies;
namespace MonoDevelop.Debugger.Tests
{
public abstract class DebugTests: TestBase
{
- readonly string eid;
+ readonly protected string EngineId;
DebuggerEngine engine;
protected DebugTests (string engineId)
{
- eid = engineId;
+ EngineId = engineId;
}
public override void Setup ()
{
base.Setup ();
foreach (DebuggerEngine e in DebuggingService.GetDebuggerEngines ()) {
- if (e.Id == eid) {
+ if (e.Id == EngineId) {
engine = e;
break;
}
@@ -59,10 +60,27 @@ public override void Setup ()
protected DebuggerSession Start (string test)
{
+ TargetRuntime runtime;
+ switch (EngineId) {
+ case "MonoDevelop.Debugger.Win32":
+ runtime = Runtime.SystemAssemblyService.GetTargetRuntime ("MS.NET");
+ break;
+ case "Mono.Debugger.Soft":
+ runtime = Runtime.SystemAssemblyService.GetTargetRuntime ("Mono");
+ break;
+ default:
+ runtime = Runtime.SystemAssemblyService.DefaultRuntime;
+ break;
+ }
+
+ if (runtime == null)
+ return null;
+
var cmd = new DotNetExecutionCommand ();
cmd.Command = Path.Combine (Path.GetDirectoryName (GetType ().Assembly.Location), "MonoDevelop.Debugger.Tests.TestApp.exe");
cmd.Arguments = test;
-
+ cmd.TargetRuntime = runtime;
+
DebuggerStartInfo si = engine.CreateDebuggerStartInfo (cmd);
DebuggerSession session = engine.CreateSession ();
var ops = new DebuggerSessionOptions ();
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs
===================================================================
@@ -42,6 +42,9 @@ public override void Setup ()
{
base.Setup ();
ds = Start ("TestEvaluation");
+ if (ds == null)
+ Assert.Ignore ("Engine not found: {0}", EngineId);
+
frame = ds.ActiveThread.Backtrace.GetFrame (0);
}
Modified: main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/StackFrameTests.cs
===================================================================
@@ -42,6 +42,9 @@ public override void Setup ()
{
base.Setup ();
ds = Start ("TestEvaluation");
+ if (ds == null)
+ Assert.Ignore ("Engine not found: {0}", EngineId);
+
frame = ds.ActiveThread.Backtrace.GetFrame (0);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches