Skip to content

Commit

Permalink
Turn on Mono logging again to get information for OmniSharp.Cake.Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinCampbell committed Apr 4, 2018
1 parent 9d99230 commit a47b0d9
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -584,13 +584,15 @@ Task("BuildTest")
BuildProject(env, projectName, projectFilePath, configuration, "test");
}
foreach (var testProject in buildPlan.TestProjects)
{
var testProject = "OmniSharp.Cake.Tests";
// foreach (var testProject in buildPlan.TestProjects)
// {
var testProjectName = testProject + ".csproj";
var testProjectFilePath = CombinePaths(env.Folders.Tests, testProject, testProjectName);
BuildProject(env, testProjectName, testProjectFilePath, testConfiguration);
}
// }
});

/// <summary>
Expand All @@ -609,8 +611,10 @@ Task("Test")
try
{
foreach (var testProject in buildPlan.TestProjects)
{
var testProject = "OmniSharp.Cake.Tests";
// foreach (var testProject in buildPlan.TestProjects)
// {
PrintBlankLine();
var instanceFolder = CombinePaths(env.Folders.Bin, testConfiguration, testProject, "net46");
Expand All @@ -636,12 +640,18 @@ Task("Test")
var runScript = CombinePaths(env.Folders.Mono, "run");
Environment.SetEnvironmentVariable("MONO_LOG_LEVEL", "debug");
Environment.SetEnvironmentVariable("MONO_LOG_MASK", "asm,dll");
// By default, the run script launches OmniSharp. To launch our Mono runtime
// with xUnit rather than OmniSharp, we pass '--no-omnisharp'
Run(runScript, $"--no-omnisharp \"{xunitInstancePath}\" {arguments}", instanceFolder)
.ExceptionOnError($"Test {testProject} failed for net46");
Environment.SetEnvironmentVariable("MONO_LOG_LEVEL", null);
Environment.SetEnvironmentVariable("MONO_LOG_MASK", null);
}
}
// }
}
finally
{
Expand Down

0 comments on commit a47b0d9

Please sign in to comment.