Skip to content

Commit

Permalink
Added code to disable graphics device creation on CI servers as it se…
Browse files Browse the repository at this point in the history
…ems to crash them even with error trapping.
  • Loading branch information
thargy committed May 26, 2018
1 parent bb1ed9c commit 3324131
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ShaderGen.Tests/Tools/ToolChain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,11 @@ private ToolChain(GraphicsBackend graphicsBackend,

features |= ToolFeatures.Compilation;
}
if (createHeadless != null &&

// Don't allow creation of graphics devices on CI Servers.
bool onCiServer = Environment.GetEnvironmentVariable("CI")?.ToLowerInvariant() == "true";
if (!onCiServer &&
createHeadless != null &&
GraphicsDevice.IsBackendSupported(graphicsBackend))
{
try
Expand All @@ -417,7 +421,8 @@ private ToolChain(GraphicsBackend graphicsBackend,
}

// TODO For future expansion, will need to review signature of function.
if (createWindowed != null &&
if (!onCiServer &&
createWindowed != null &&
GraphicsDevice.IsBackendSupported(graphicsBackend))
{
try
Expand Down

0 comments on commit 3324131

Please sign in to comment.