mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 05:52:11 +00:00
Attempt to fix builds on appveyor even more.
This commit is contained in:
parent
3bfaf7f670
commit
c90e41ad48
1 changed files with 33 additions and 19 deletions
|
|
@ -12,31 +12,45 @@ namespace DebugCompiler
|
||||||
[TestCaseSource(typeof(MySource), nameof(MySource.ProvideData))]
|
[TestCaseSource(typeof(MySource), nameof(MySource.ProvideData))]
|
||||||
public void Test(Type kernelToRun)
|
public void Test(Type kernelToRun)
|
||||||
{
|
{
|
||||||
Environment.CurrentDirectory = Path.GetDirectoryName(typeof(RunKernels).Assembly.Location);
|
try
|
||||||
|
{
|
||||||
|
Environment.CurrentDirectory = Path.GetDirectoryName(typeof(RunKernels).Assembly.Location);
|
||||||
|
|
||||||
var xEngine = new Engine();
|
var xEngine = new Engine();
|
||||||
// Sets the time before an error is registered. For example if set to 60 then if a kernel runs for more than 60 seconds then
|
|
||||||
// that kernel will be marked as a failure and terminated
|
|
||||||
xEngine.AllowedSecondsInKernel = 300;
|
|
||||||
|
|
||||||
// If you want to test only specific platforms, add them to the list, like next line. By default, all platforms are run.
|
// Sets the time before an error is registered. For example if set to 60 then if a kernel runs for more than 60 seconds then
|
||||||
xEngine.RunTargets.Add(RunTargetEnum.Bochs);
|
// that kernel will be marked as a failure and terminated
|
||||||
//xEngine.StartBochsDebugGui = false;
|
xEngine.AllowedSecondsInKernel = 300;
|
||||||
//xEngine.RunWithGDB = true;
|
|
||||||
// If you're working on the compiler (or other lower parts), you can choose to run the compiler in process
|
|
||||||
// one thing to keep in mind though, is that this only works with 1 kernel at a time!
|
|
||||||
//xEngine.RunIL2CPUInProcess = true;
|
|
||||||
xEngine.TraceAssembliesLevel = TraceAssemblies.User;
|
|
||||||
|
|
||||||
xEngine.EnableStackCorruptionChecks = true;
|
// If you want to test only specific platforms, add them to the list, like next line. By default, all platforms are run.
|
||||||
xEngine.StackCorruptionChecksLevel = StackCorruptionDetectionLevel.AllInstructions;
|
xEngine.RunTargets.Add(RunTargetEnum.Bochs);
|
||||||
|
|
||||||
// Select kernels to be tested by adding them to the engine
|
//xEngine.StartBochsDebugGui = false;
|
||||||
xEngine.AddKernel(kernelToRun.Assembly.Location);
|
//xEngine.RunWithGDB = true;
|
||||||
|
// If you're working on the compiler (or other lower parts), you can choose to run the compiler in process
|
||||||
|
// one thing to keep in mind though, is that this only works with 1 kernel at a time!
|
||||||
|
//xEngine.RunIL2CPUInProcess = true;
|
||||||
|
xEngine.TraceAssembliesLevel = TraceAssemblies.User;
|
||||||
|
|
||||||
xEngine.OutputHandler = new TestOutputHandler();
|
xEngine.EnableStackCorruptionChecks = true;
|
||||||
|
xEngine.StackCorruptionChecksLevel = StackCorruptionDetectionLevel.AllInstructions;
|
||||||
|
|
||||||
Assert.IsTrue(xEngine.Execute());
|
// Select kernels to be tested by adding them to the engine
|
||||||
|
xEngine.AddKernel(kernelToRun.Assembly.Location);
|
||||||
|
|
||||||
|
xEngine.OutputHandler = new TestOutputHandler();
|
||||||
|
|
||||||
|
Assert.IsTrue(xEngine.Execute());
|
||||||
|
}
|
||||||
|
catch (AssertionException)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
catch(Exception E)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Exception occurred: " + E.ToString());
|
||||||
|
Assert.Fail();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestOutputHandler : OutputHandlerFullTextBase
|
private class TestOutputHandler : OutputHandlerFullTextBase
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue