diff --git a/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs b/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs index 449073d103..8c4161ea1c 100644 --- a/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs +++ b/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs @@ -13,16 +13,16 @@ public static void Apply(Engine engine) engine.AllowedSecondsInKernel = 120; - // Currently, there's still a bug somewhere for testing vmware. - //engine.RunTargets.Remove(RunTargetEnum.Bochs); + // 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.RunIL2CPUInProcess = true; 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: } diff --git a/Tests/Cosmos.TestRunner.Core/Engine.Helpers.cs b/Tests/Cosmos.TestRunner.Core/Engine.Helpers.cs index 79ad69b667..5a64f1c19e 100644 --- a/Tests/Cosmos.TestRunner.Core/Engine.Helpers.cs +++ b/Tests/Cosmos.TestRunner.Core/Engine.Helpers.cs @@ -36,7 +36,7 @@ private void RunIL2CPU(string kernelFileName, string outputFile) var xArguments = new[] { "DebugEnabled:True", - "StackCorruptionDetectionEnabled:False", + "StackCorruptionDetectionEnabled:true", "DebugMode:Source", "TraceAssemblies:", "DebugCom:1", diff --git a/Tests/Cosmos.TestRunner.Core/Engine.Running.cs b/Tests/Cosmos.TestRunner.Core/Engine.Running.cs index 29d8c0c551..b43bfde4f7 100644 --- a/Tests/Cosmos.TestRunner.Core/Engine.Running.cs +++ b/Tests/Cosmos.TestRunner.Core/Engine.Running.cs @@ -45,6 +45,14 @@ private void InitializeDebugConnector(DebugConnector debugConnector) debugConnector.CmdBreak = t => { }; + debugConnector.CmdStackCorruptionOccurred = + a => + { + OutputHandler.LogMessage("Stackcorruption occurred at: 0x" + a.ToString("X8")); + OutputHandler.SetKernelTestResult(false, "Stackcorruption occurred at: 0x" + a.ToString("X8")); + mKernelResultSet = true; + mKernelRunning = false; + }; } private void HandleRunning(DebugConnector debugConnector, Base host) diff --git a/Tests/Cosmos.TestRunner/Program.cs b/Tests/Cosmos.TestRunner/Program.cs index 6e6a901f8c..bed8e655f2 100644 --- a/Tests/Cosmos.TestRunner/Program.cs +++ b/Tests/Cosmos.TestRunner/Program.cs @@ -21,7 +21,7 @@ static void Main(string[] args) var xOutputXml = new OutputHandlerXml(); xEngine.OutputHandler = new MultiplexingOutputHandler( xOutputXml, - new OutputHandlerConsole()); + new OutputHandlerFullConsole()); xEngine.Execute(); diff --git a/install-VS2015.bat b/install-VS2015.bat index 70efd3d977..df8b073744 100644 --- a/install-VS2015.bat +++ b/install-VS2015.bat @@ -1,7 +1,7 @@ @REM Delete so if builder fails it wont exist del source\Cosmos.Build.Builder\bin\Debug\Cosmos.Build.Builder.* -%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "source\Builder.sln" /nologo /maxcpucount /p:Configuration=Debug /p:Platform=x86 +"%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild.exe" "source\Builder.sln" /nologo /maxcpucount /p:Configuration=Debug /p:Platform=x86 @if not exist source\Cosmos.Build.Builder\bin\Debug\Cosmos.Build.Builder.exe goto error diff --git a/source/Cosmos.Build.Builder/CosmosTask.cs b/source/Cosmos.Build.Builder/CosmosTask.cs index aa0c131429..b128221fbd 100644 --- a/source/Cosmos.Build.Builder/CosmosTask.cs +++ b/source/Cosmos.Build.Builder/CosmosTask.cs @@ -41,6 +41,7 @@ public static string GetSetupName(int releaseNumber) case VsVersion.Vs2015: setupName += "-vs2015"; break; + } if (App.UseVsHive) @@ -82,7 +83,7 @@ public static string GetSetupName(int releaseNumber) CompileCosmos(); //Working CopyTemplates(); - + CreateScriptToUseChangesetWhichTaskIsUse(); CreateSetup(); //Working @@ -119,7 +120,7 @@ public static string GetSetupName(int releaseNumber) } protected void MsBuild(string aSlnFile, string aBuildCfg) { - string xMsBuild = Path.Combine(Paths.Windows, @"Microsoft.NET\Framework\v4.0.30319\msbuild.exe"); + string xMsBuild = Path.Combine(Paths.ProgFiles32, @"MSBuild\14.0\Bin\msbuild.exe"); string xParams = Quoted(aSlnFile) + @" /maxcpucount /verbosity:normal /nologo /p:Configuration=" + aBuildCfg + " /p:Platform=x86 /p:OutputPath=" + Quoted(mOutputDir); // Clean then build: http://adrianfoyn.wordpress.com/2011/03/30/wrestling-with-msbuild-the-bane-of-trebuild/ if (false == App.NoMsBuildClean) { @@ -259,7 +260,7 @@ public static string GetSetupName(int releaseNumber) CheckIfUserKitRunning(); CheckIsVsRunning(); CheckIfBuilderRunning(); - + switch (App.VsVersion) { case VsVersion.Vs2013: CheckVs2013(); @@ -374,7 +375,7 @@ public static string GetSetupName(int releaseNumber) void WriteDevKit() { Section("Writing Dev Kit to Registry"); - // Inno deletes this from registry, so we must add this after. + // Inno deletes this from registry, so we must add this after. // We let Inno delete it, so if user runs it by itself they get // only UserKit, and no DevKit settings. // HKCU instead of HKLM because builder does not run as admin. @@ -527,4 +528,4 @@ public static string GetSetupName(int releaseNumber) Section("Build Complete!"); } } -} \ No newline at end of file +} diff --git a/source/Cosmos.Debug.Common/DebugConnector.Thread.cs b/source/Cosmos.Debug.Common/DebugConnector.Thread.cs index 2d92271f99..cdcf0c89fc 100644 --- a/source/Cosmos.Debug.Common/DebugConnector.Thread.cs +++ b/source/Cosmos.Debug.Common/DebugConnector.Thread.cs @@ -138,7 +138,7 @@ private void ThreadMethod() xPendingOutgoing.Completed.Set(); } - throw; + return; } catch (Exception E) { diff --git a/source/Cosmos.IL2CPU/IL/Branch.cs b/source/Cosmos.IL2CPU/IL/Branch.cs index 68d68b1b8e..8a73d8e458 100644 --- a/source/Cosmos.IL2CPU/IL/Branch.cs +++ b/source/Cosmos.IL2CPU/IL/Branch.cs @@ -208,24 +208,27 @@ public override void Execute(MethodInfo aMethod, ILOpCode aOpCode) //else //{ // todo: improve code clarity - if (xStackContentSize > 4) - { - throw new Exception("Cosmos.IL2CPU.x86->IL->Branch.cs->Error: Simple branches are not yet supported on operands > 4 bytes!"); - } - new CPU.Pop { DestinationReg = CPU.Registers.EAX }; - if (xTestOp == ConditionalTestEnum.Zero) - { - new CPU.Compare { DestinationReg = CPU.Registers.EAX, SourceValue = 0 }; - new CPU.ConditionalJump { Condition = ConditionalTestEnum.Equal, DestinationLabel = AppAssembler.TmpBranchLabel(aMethod, aOpCode) }; - } - else if (xTestOp == ConditionalTestEnum.NotZero) + if (xStackContentSize <= 4) { - new CPU.Compare { DestinationReg = CPU.Registers.EAX, SourceValue = 0 }; - new CPU.ConditionalJump { Condition = ConditionalTestEnum.NotEqual, DestinationLabel = AppAssembler.TmpBranchLabel(aMethod, aOpCode) }; + new CPU.Pop {DestinationReg = CPU.Registers.EAX}; + if (xTestOp == ConditionalTestEnum.Zero) + { + new CPU.Compare {DestinationReg = CPU.Registers.EAX, SourceValue = 0}; + new CPU.ConditionalJump {Condition = ConditionalTestEnum.Equal, DestinationLabel = AppAssembler.TmpBranchLabel(aMethod, aOpCode)}; + } + else if (xTestOp == ConditionalTestEnum.NotZero) + { + new CPU.Compare {DestinationReg = CPU.Registers.EAX, SourceValue = 0}; + new CPU.ConditionalJump {Condition = ConditionalTestEnum.NotEqual, DestinationLabel = AppAssembler.TmpBranchLabel(aMethod, aOpCode)}; + } + else + { + throw new NotSupportedException("Cosmos.IL2CPU.x86->IL->Branch.cs->Error: Situation not supported yet! (In the Simple Comparison)"); + } } else { - throw new NotSupportedException("Cosmos.IL2CPU.x86->IL->Branch.cs->Error: Situation not supported yet! (In the Simple Comparison)"); + throw new Exception("Cosmos.IL2CPU.x86->IL->Branch.cs->Error: Simple branches are not yet supported on operands > 4 bytes!"); } } //}