Skip to content
Merged
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 @@ -399,7 +399,17 @@ public async Task InvokeTestingPlatform_Target_Should_Set_DotnetRoot_For_AppHost
environmentVariables: CreateEnvironmentVariables(),
cancellationToken: TestContext.CancellationToken);

derivedResult.AssertOutputContains($"[env] {dotnetRootVariableName}={dotnetRoot}");
string dotnetRootOutputPrefix = $"[env] {dotnetRootVariableName}=";
string? dotnetRootOutput = derivedResult.StandardOutputLines
.Select(line => line.TrimStart())
.FirstOrDefault(line => line.StartsWith(dotnetRootOutputPrefix, StringComparison.Ordinal));
Assert.IsNotNull(dotnetRootOutput, derivedResult.ToString());
// DOTNET_HOST_PATH can preserve different drive-letter casing than RootFinder on Windows.
Assert.AreEqual(
dotnetRoot,
dotnetRootOutput[dotnetRootOutputPrefix.Length..],
ignoreCase: OperatingSystem.IsWindows(),
derivedResult.ToString());

DotnetMuxerResult explicitResult = await DotnetCli.RunAsync(
$"build -t:Test -p:TestingPlatformCaptureOutput=False -p:ExplicitDotnetRoot=\"{dotnetRoot}\" \"{testAsset.TargetAssetPath}\"",
Expand Down