Skip to content

Commit 5d32c33

Browse files
committed
fix(pipeline): pass ILogger directly to HasFrameworkOutput for testability (#5752)
1 parent a8c9db0 commit 5d32c33

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

TUnit.Pipeline/Modules/Abstract/TestBaseModule.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected virtual IEnumerable<string> TestableFrameworks
3131
// Skip frameworks that this project did not actually build to avoid spurious
3232
// "process cannot find the file" errors for missing per-TFM output binaries.
3333
var configuration = testOptions.Configuration ?? "Release";
34-
if (!HasFrameworkOutput(context, executionOptions, framework, configuration))
34+
if (!HasFrameworkOutput(context.Logger, executionOptions, framework, configuration))
3535
{
3636
context.Logger.LogInformation("Skipping {Framework}: no build output found for this test project.", framework);
3737
continue;
@@ -50,13 +50,13 @@ protected virtual IEnumerable<string> TestableFrameworks
5050
return results;
5151
}
5252

53-
private static bool HasFrameworkOutput(IModuleContext context, CommandExecutionOptions? executionOptions, string framework, string configuration)
53+
private static bool HasFrameworkOutput(ILogger logger, CommandExecutionOptions? executionOptions, string framework, string configuration)
5454
{
5555
var workingDirectory = executionOptions?.WorkingDirectory;
5656
if (string.IsNullOrEmpty(workingDirectory))
5757
{
5858
// Cannot determine — fall through to attempt the run (preserves prior behaviour).
59-
context.Logger.LogWarning("Cannot probe build output for {Framework}: no WorkingDirectory set on execution options.", framework);
59+
logger.LogWarning("Cannot probe build output for {Framework}: no WorkingDirectory set on execution options.", framework);
6060
return true;
6161
}
6262

0 commit comments

Comments
 (0)