Skip to content

Commit 490df3d

Browse files
committed
make profiler runner logging more helpful
1 parent 3d9bef9 commit 490df3d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/tests/profiler/common/ProfilerTestRunner.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,20 @@ public static int Run(string profileePath,
8383
process.BeginOutputReadLine();
8484

8585
process.WaitForExit();
86-
if (process.ExitCode == 100 && verifier.HasPassingOutput)
87-
{
88-
return 100;
89-
}
90-
else
86+
87+
if (!verifier.HasPassingOutput)
9188
{
9289
LogTestFailure("Profiler tests are expected to contain the text \'" + verifier.SuccessPhrase + "\' in the console output " +
9390
"of the profilee app to indicate a passing test. Usually it is printed from the Shutdown() method of the profiler implementation. This " +
9491
"text was not found in the output above.");
95-
return process.ExitCode == 100 ? process.ExitCode : -1;
9692
}
93+
94+
if (process.ExitCode != 100)
95+
{
96+
LogTestFailure($"Profilee returned exit code {process.ExitCode} instead of expected exit code 100.");
97+
}
98+
99+
return 100;
97100
}
98101

99102
private static string GetProfilerPath()

0 commit comments

Comments
 (0)