Skip to content

Commit

Permalink
Fix broken verbose reporting of successful tests
Browse files Browse the repository at this point in the history
We werre missing passing through the verbosity setting to the trx command, because we were creating a brand new setting class after the fact.

Since all the logic in that settings class (defaulting the path) is encapsulated in the Validate method, we can safely just use it when running the command.

For dotnet-retest we never do recursive log lookup, and we should preserve the legacy Skipped setting if it's provided too.
  • Loading branch information
kzu committed Feb 18, 2025
1 parent fc32bcf commit 2695bdc
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/dotnet-retest/RetestCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ public override async Task<int> ExecuteAsync(CommandContext context, RetestSetti
Verbosity = settings.Verbosity,
GitHubComment = settings.GitHubComment,
GitHubSummary = settings.GitHubSummary,
Skipped = settings.Skipped,
Recursive = false,
};

if (trx.Validate() is { Successful: false } result)
Expand Down Expand Up @@ -201,15 +203,7 @@ public override async Task<int> ExecuteAsync(CommandContext context, RetestSetti

if (settings.NoSummary != true && Directory.Exists(trx.Path))
{
new TrxCommand().Execute(context, new TrxCommand.TrxSettings
{
GitHubComment = settings.GitHubComment,
GitHubSummary = settings.GitHubSummary,
Output = settings.Output,
Path = trx.Path,
Skipped = settings.Skipped,
Recursive = false,
});
new TrxCommand().Execute(context, trx);
}

return exitCode;
Expand Down

0 comments on commit 2695bdc

Please sign in to comment.