Skip to content

Commit

Permalink
make profiler runner logging more helpful
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason committed Nov 5, 2020
1 parent 3d9bef9 commit 490df3d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/tests/profiler/common/ProfilerTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,20 @@ public static int Run(string profileePath,
process.BeginOutputReadLine();

process.WaitForExit();
if (process.ExitCode == 100 && verifier.HasPassingOutput)
{
return 100;
}
else

if (!verifier.HasPassingOutput)
{
LogTestFailure("Profiler tests are expected to contain the text \'" + verifier.SuccessPhrase + "\' in the console output " +
"of the profilee app to indicate a passing test. Usually it is printed from the Shutdown() method of the profiler implementation. This " +
"text was not found in the output above.");
return process.ExitCode == 100 ? process.ExitCode : -1;
}

if (process.ExitCode != 100)
{
LogTestFailure($"Profilee returned exit code {process.ExitCode} instead of expected exit code 100.");
}

return 100;
}

private static string GetProfilerPath()
Expand Down

0 comments on commit 490df3d

Please sign in to comment.