From b011e65aa736bab229b7d7b86a652bd7579a5a6b Mon Sep 17 00:00:00 2001 From: Haritha Mohan Date: Fri, 23 Feb 2024 07:49:18 -0800 Subject: [PATCH] address review --- tests/common/DotNet.cs | 2 +- tests/dotnet/UnitTests/Extensions.cs | 1 - tests/dotnet/UnitTests/ProjectTest.cs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/common/DotNet.cs b/tests/common/DotNet.cs index 929ef4bf022c..1e7afae875ae 100644 --- a/tests/common/DotNet.cs +++ b/tests/common/DotNet.cs @@ -117,7 +117,7 @@ public static ExecutionResult InstallTool (string tool, string path) { var installed = ExecuteCommand (Executable, "tool", "list", "--tool-path", path); if (!installed.StandardOutput.ToString ().Contains (tool)) - ExecuteCommand (Executable, "tool", "install", tool, "--tool-path", path); + installed = ExecuteCommand (Executable, "tool", "install", tool, "--tool-path", path); return installed; } diff --git a/tests/dotnet/UnitTests/Extensions.cs b/tests/dotnet/UnitTests/Extensions.cs index e9c113ba1c7a..7a606da98bcc 100644 --- a/tests/dotnet/UnitTests/Extensions.cs +++ b/tests/dotnet/UnitTests/Extensions.cs @@ -1,5 +1,4 @@ using System; -using System.Diagnostics; using System.IO; #nullable enable diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index 70f8abe4cb36..5f8686313c77 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -1693,7 +1693,7 @@ public void SourcelinkTest (ApplePlatform platform, string runtimeIdentifiers, s var tool = "sourcelink"; var toolPath = Directory.GetCurrentDirectory (); DotNet.InstallTool (tool, toolPath); - var test = DotNet.RunTool ($"{toolPath}/{tool}", "test", $"{pdbFile}"); + var test = DotNet.RunTool (Path.Combine (toolPath, tool), "test", pdbFile!); Assert.AreEqual ($"sourcelink test passed: {pdbFile}", test.StandardOutput.ToString ()); }