Attempt to fix builds on appveyor even more.

This commit is contained in:
Matthijs ter Woord 2016-06-25 13:50:05 -04:00
parent 3bfaf7f670
commit c90e41ad48

View file

@ -11,16 +11,20 @@ namespace DebugCompiler
{ {
[TestCaseSource(typeof(MySource), nameof(MySource.ProvideData))] [TestCaseSource(typeof(MySource), nameof(MySource.ProvideData))]
public void Test(Type kernelToRun) public void Test(Type kernelToRun)
{
try
{ {
Environment.CurrentDirectory = Path.GetDirectoryName(typeof(RunKernels).Assembly.Location); 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 // 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 // that kernel will be marked as a failure and terminated
xEngine.AllowedSecondsInKernel = 300; 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. // If you want to test only specific platforms, add them to the list, like next line. By default, all platforms are run.
xEngine.RunTargets.Add(RunTargetEnum.Bochs); xEngine.RunTargets.Add(RunTargetEnum.Bochs);
//xEngine.StartBochsDebugGui = false; //xEngine.StartBochsDebugGui = false;
//xEngine.RunWithGDB = true; //xEngine.RunWithGDB = true;
// If you're working on the compiler (or other lower parts), you can choose to run the compiler in process // If you're working on the compiler (or other lower parts), you can choose to run the compiler in process
@ -38,6 +42,16 @@ namespace DebugCompiler
Assert.IsTrue(xEngine.Execute()); 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
{ {