Skip to content

Commit

Permalink
Fix a bug in the reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
mterwoord committed Jun 27, 2015
1 parent 4e13367 commit c1851c9
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions Tests/Cosmos.TestRunner.Core/Cosmos.TestRunner.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RunConfiguration.cs" />
<Compile Include="TaskFailedException.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\source\Cosmos.Build.Common\Cosmos.Build.Common.csproj">
Expand Down
9 changes: 9 additions & 0 deletions Tests/Cosmos.TestRunner.Core/Engine.Run.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ private void ExecuteKernel(string assemblyFileName, RunConfiguration configurati
}
catch (Exception e)
{
if (!mKernelResultSet)
{
OutputHandler.SetKernelTestResult(false, e.ToString());
}
if (e is TaskFailedException)
{
return;
}
OutputHandler.UnhandledException(e);
}
finally
Expand All @@ -62,6 +70,7 @@ private void RunTask(string taskName, Action action)
catch (Exception e)
{
OutputHandler.UnhandledException(e);
throw new TaskFailedException();
}
finally
{
Expand Down
1 change: 1 addition & 0 deletions Tests/Cosmos.TestRunner.Core/OutputHandlerXml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public override void TaskEnd(string taskName)
mTaskStopwatch.Stop();
var xItem = mCurrentNode.Pop();
xItem.Attributes.Append(NewXmlAttribute("Duration", mTaskStopwatch.Elapsed.ToString("c")));

}

public override void SetKernelTestResult(bool succeeded, string message)
Expand Down
9 changes: 9 additions & 0 deletions Tests/Cosmos.TestRunner.Core/TaskFailedException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;

namespace Cosmos.TestRunner.Core
{
public class TaskFailedException: Exception
{

}
}
4 changes: 4 additions & 0 deletions Tests/Cosmos.TestRunner/Cosmos.TestRunner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
<Project>{758FAF24-9974-4DB8-82EF-1B64DAF2F0BC}</Project>
<Name>Cosmos.TestRunner.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Staging\VGACompilerCrash\VGACompilerCrash.csproj">
<Project>{21915a7e-cc84-4836-8b87-857b6149d496}</Project>
<Name>VGACompilerCrash</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down

0 comments on commit c1851c9

Please sign in to comment.