mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-20 12:58:39 +00:00
42 lines
1.5 KiB
C#
42 lines
1.5 KiB
C#
using System;
|
||
using System.Linq;
|
||
|
||
namespace Cosmos.TestRunner.Core
|
||
{
|
||
public static class DefaultEngineConfiguration
|
||
{
|
||
public static void Apply(Engine engine)
|
||
{
|
||
if (engine == null)
|
||
{
|
||
throw new ArgumentNullException("engine");
|
||
}
|
||
|
||
engine.AllowedSecondsInKernel = 120;
|
||
|
||
// If you want to exclude a testing platform, modify uncomment and modify the following line
|
||
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 = 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);
|
||
|
||
// 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!");
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|