Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add status checks to the test runner #1179

Open
wants to merge 3 commits into
base: draft-v8
Choose a base branch
from

Conversation

BillWagner
Copy link
Member

Contributes to #1125

Replace the existing logging code with the utility class that writes to the console, and adds a status check record.

Log failures as status checks, but status is only to the output console.

Contributes to dotnet#1125

Replace the existing logging code with the utility class that writes to the console, and adds a status check record.

Log failures as status checks, but status is only to the output console.
@@ -10,7 +10,7 @@ namespace Utilities;
/// <param name="Id">The error message ID</param>
/// <param name="StartLine">The start line (index from 1)</param>
/// <param name="EndLine">The end line (index from 1)</param>
public record Diagnostic(string file, int StartLine, int EndLine, string Message, string Id);
public record StatusCheckMessage(string file, int StartLine, int EndLine, string Message, string Id);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the name of this record type because the tester uses the "Diagnostic" class from the roslyn APIs. We don't use this in too many places, so the global change seemed the right way to go

/// Log the diagnostic information to console. These will only appear in the console window, not
/// as annotations on the changes in the PR.
/// </remarks>
public void ConsoleOnlyLog(StatusCheckMessage d)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this method because it looks like many of the status messages on the tester would be just to the console, rather than annotate the spec with info on every test.

tools/Utilities/StatusCheckLogger.cs Outdated Show resolved Hide resolved
@jskeet
Copy link
Contributor

jskeet commented Sep 21, 2024

Will review on Tuesday when I'm back at work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants