From 9e33bac82294f36cb589a00a9ca11cec332ebd68 Mon Sep 17 00:00:00 2001 From: Matthijs ter Woord Date: Thu, 23 Jul 2015 11:42:46 -0400 Subject: [PATCH] . --- .../DefaultEngineConfiguration.cs | 20 +++++++++++++++---- Tests/Cosmos.TestRunner.Core/Engine.cs | 8 ++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs b/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs index 2cee05c78..a4a0ea786 100644 --- a/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs +++ b/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; namespace Cosmos.TestRunner.Core { @@ -14,17 +15,28 @@ namespace Cosmos.TestRunner.Core engine.AllowedSecondsInKernel = 120; // If you want to exclude a testing platform, modify uncomment and modify the following line - engine.RunTargets.Remove(RunTargetEnum.Bochs); + engine.RunTargets.Remove(RunTargetEnum.VMware); // if you're working on the compiler (or other lower parts), you can choose to run the compiler in process // 1 thing to keep in mind though, is that this only works with 1 kernel at a time! - engine.RunIL2CPUInProcess = true; + engine.RunIL2CPUInProcess = false; engine.AddKernel(typeof(Cosmos.Compiler.Tests.SimpleWriteLine.Kernel.Kernel).Assembly.Location); - //engine.AddKernel(typeof(SimpleStructsAndArraysTest.Kernel).Assembly.Location); - //engine.AddKernel(typeof(VGACompilerCrash.Kernel).Assembly.Location); + engine.AddKernel(typeof(SimpleStructsAndArraysTest.Kernel).Assembly.Location); + engine.AddKernel(typeof(VGACompilerCrash.Kernel).Assembly.Location); // known bugs, therefor disabled for now: + + // end of known bugs + + // double check: this check is in the engine, but lets put it here as well + if (engine.RunIL2CPUInProcess) + { + if (engine.KernelsToRun.Count() > 1) + { + throw new InvalidOperationException("Can only run 1 kernel if IL2CPU is ran in-process!"); + } + } } } } diff --git a/Tests/Cosmos.TestRunner.Core/Engine.cs b/Tests/Cosmos.TestRunner.Core/Engine.cs index 41d703a65..d31437e90 100644 --- a/Tests/Cosmos.TestRunner.Core/Engine.cs +++ b/Tests/Cosmos.TestRunner.Core/Engine.cs @@ -14,6 +14,14 @@ namespace Cosmos.TestRunner.Core // configuration: in process eases debugging, but means certain errors (like stack overflow) kill the test runner. public bool RunIL2CPUInProcess = false; + public IEnumerable KernelsToRun + { + get + { + return mKernelsToRun; + } + } + private List mKernelsToRun = new List(); public void AddKernel(string assemblyFile) {