Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
private int? _testHostExitCode;
private int? _testHostPID;

[UnsupportedOSPlatform("browser")]
public TestHostControllersTestHost(TestHostControllerConfiguration testHostsInformation, ServiceProvider serviceProvider, PassiveNode? passiveNode, IEnvironment environment,
ILoggerFactory loggerFactory, IClock clock)
: base(serviceProvider)
Expand Down Expand Up @@ -107,12 +108,11 @@
string arguments = string.Join(' ', partialCommandLine);
#endif

#pragma warning disable CA1416 // Validate platform compatibility
ProcessStartInfo processStartInfo = new(

Check failure on line 111 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L111

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(111,49): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
executableInfo.FilePath,
arguments)
{
EnvironmentVariables =

Check failure on line 115 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L115

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(115,17): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.EnvironmentVariables' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 115 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L115

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(115,17): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.EnvironmentVariables' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
{
{ $"{EnvironmentVariableConstants.TESTINGPLATFORM_TESTHOSTCONTROLLER_CORRELATIONID}_{currentPid}", processCorrelationId },
{ $"{EnvironmentVariableConstants.TESTINGPLATFORM_TESTHOSTCONTROLLER_PARENTPID}_{currentPid}", processIdString },
Expand All @@ -123,7 +123,6 @@
UseShellExecute = false,
#endif
};
#pragma warning restore CA1416

List<IDataConsumer> dataConsumersBuilder = [.. _testHostsInformation.DataConsumer];

Expand Down Expand Up @@ -211,9 +210,7 @@

foreach (EnvironmentVariable envVar in environmentVariables.GetAll())
{
#pragma warning disable CA1416 // Validate platform compatibility
processStartInfo.EnvironmentVariables[envVar.Variable] = envVar.Value;

Check failure on line 213 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L213

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(213,21): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.EnvironmentVariables' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 213 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L213

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(213,21): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.EnvironmentVariables' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 213 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L213

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(213,21): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.EnvironmentVariables' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 213 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L213

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(213,21): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.EnvironmentVariables' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
#pragma warning restore CA1416
}
}

Expand All @@ -228,13 +225,9 @@

// Launch the test host process
string testHostProcessStartupTime = _clock.UtcNow.ToString("HH:mm:ss.fff", CultureInfo.InvariantCulture);
#pragma warning disable CA1416 // Validate platform compatibility
processStartInfo.EnvironmentVariables.Add($"{EnvironmentVariableConstants.TESTINGPLATFORM_TESTHOSTCONTROLLER_TESTHOSTPROCESSSTARTTIME}_{currentPid}", testHostProcessStartupTime);

Check failure on line 228 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L228

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(228,13): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.EnvironmentVariables' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 228 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L228

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(228,13): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.EnvironmentVariables' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 228 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L228

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(228,13): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.EnvironmentVariables' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 228 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L228

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(228,13): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.EnvironmentVariables' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
#pragma warning restore CA1416
await _logger.LogDebugAsync($"{EnvironmentVariableConstants.TESTINGPLATFORM_TESTHOSTCONTROLLER_TESTHOSTPROCESSSTARTTIME}_{currentPid} '{testHostProcessStartupTime}'").ConfigureAwait(false);
#pragma warning disable CA1416 // Validate platform compatibility
await _logger.LogDebugAsync($"Starting test host process '{processStartInfo.FileName}' with args '{processStartInfo.Arguments}'").ConfigureAwait(false);

Check failure on line 230 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L230

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(230,112): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.Arguments' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 230 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L230

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(230,72): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.FileName' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 230 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L230

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(230,112): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.Arguments' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 230 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L230

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(230,72): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.FileName' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 230 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L230

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(230,112): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.Arguments' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 230 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L230

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(230,72): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.FileName' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 230 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L230

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(230,112): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.Arguments' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 230 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L230

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(230,72): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.FileName' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 230 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L230

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(230,112): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ProcessStartInfo.Arguments' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
#pragma warning restore CA1416
using IProcess testHostProcess = process.Start(processStartInfo);

int? testHostProcessId = null;
Expand Down Expand Up @@ -274,9 +267,7 @@
// Wait for the test host controller to send the PID of the test host process
using (CancellationTokenSource timeout = new(TimeoutHelper.DefaultHangTimeSpanTimeout))
{
#pragma warning disable CA1416 // Validate platform compatibility
_waitForPid.Wait(timeout.Token);

Check failure on line 270 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L270

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(270,21): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ManualResetEventSlim.Wait(CancellationToken)' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 270 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L270

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(270,21): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ManualResetEventSlim.Wait(CancellationToken)' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check failure on line 270 in src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs#L270

src/Platform/Microsoft.Testing.Platform/Hosts/TestHostControllersTestHost.cs(270,21): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'ManualResetEventSlim.Wait(CancellationToken)' is unsupported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
#pragma warning restore CA1416
}

await _logger.LogDebugAsync("Fire OnTestHostProcessStartedAsync").ConfigureAwait(false);
Expand Down
Loading