From 1cbbd9c22fd9ff3ee04887fe70ab2cbad21eb6a6 Mon Sep 17 00:00:00 2001 From: David Mueller IWS Date: Sat, 1 Apr 2023 22:59:49 +0200 Subject: [PATCH 1/2] issue 3510 replacing calls to BuildMultipleAssemblyPath by GetASsetFullPath when passing only one source --- .../BlameDataCollectorTests.cs | 6 ++--- .../DataCollectionTests.cs | 8 +++---- .../DebugAssertTests.cs | 2 +- .../DotnetTestTests.cs | 4 ++-- .../ExecutionTests.cs | 24 +++++++++---------- .../ExecutionThreadApartmentStateTests.cs | 8 +++---- .../MultitargetingTestHostTests.cs | 2 +- .../RecursiveResourcesLookupTests.cs | 2 +- .../SelfContainedAppTests.cs | 2 +- .../DataCollectorTests.Coverlet.cs | 2 +- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/BlameDataCollectorTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/BlameDataCollectorTests.cs index 9233342f2f..8adc7d83ca 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/BlameDataCollectorTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/BlameDataCollectorTests.cs @@ -63,7 +63,7 @@ public void BlameDataCollectorShouldOutputDumpFile(RunnerInfo runnerInfo) { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject3.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject3.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, string.Empty, runnerInfo.InIsolationValue); arguments = string.Concat(arguments, $" /Blame:CollectDump"); arguments = string.Concat(arguments, $" /ResultsDirectory:{TempDirectory.Path}"); @@ -87,7 +87,7 @@ public void BlameDataCollectorShouldNotOutputDumpFileWhenNoCrashOccurs(RunnerInf { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, string.Empty, runnerInfo.InIsolationValue); arguments = string.Concat(arguments, $" /Blame:CollectDump"); arguments = string.Concat(arguments, $" /ResultsDirectory:{TempDirectory.Path}"); @@ -111,7 +111,7 @@ public void BlameDataCollectorShouldOutputDumpFileWhenNoCrashOccursButCollectAlw { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, string.Empty, runnerInfo.InIsolationValue); arguments = string.Concat(arguments, $" /Blame:CollectDump;CollectAlways=True"); arguments = string.Concat(arguments, $" /ResultsDirectory:{TempDirectory.Path}"); diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/DataCollectionTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/DataCollectionTests.cs index e6d0619a7c..988ce3b152 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/DataCollectionTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/DataCollectionTests.cs @@ -26,7 +26,7 @@ public void ExecuteTestsWithDataCollection(RunnerInfo runnerInfo) { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject2.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject2.dll"); string runSettings = GetRunsettingsFilePath(TempDirectory.Path); string diagFileName = Path.Combine(TempDirectory.Path, "diaglog.txt"); var extensionsPath = Path.Combine( @@ -56,7 +56,7 @@ public void ExecuteTestsWithDataCollectionUsingCollectArgument(RunnerInfo runner { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject2.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject2.dll"); string diagFileName = Path.Combine(TempDirectory.Path, "diaglog.txt"); var extensionsPath = Path.Combine( _testEnvironment.TestAssetsPath, @@ -111,8 +111,8 @@ public void DataCollectorAttachmentProcessor(RunnerInfo runnerInfo) { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPath = BuildMultipleAssemblyPath("SimpleTestProject.dll"); - var secondAssemblyPath = BuildMultipleAssemblyPath("SimpleTestProject2.dll"); + var assemblyPath = GetAssetFullPath("SimpleTestProject.dll"); + var secondAssemblyPath = GetAssetFullPath("SimpleTestProject2.dll"); string runSettings = GetRunsettingsFilePath(TempDirectory.Path); string diagFileName = Path.Combine(TempDirectory.Path, "diaglog.txt"); var extensionsPath = Path.Combine( diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/DebugAssertTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/DebugAssertTests.cs index 4d7db654f2..abff214c4a 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/DebugAssertTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/DebugAssertTests.cs @@ -18,7 +18,7 @@ public void RunningTestWithAFailingDebugAssertDoesNotCrashTheHostingProcess(Runn // is to not crash the process when we are running in debug, and debugger is attached SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPath = BuildMultipleAssemblyPath("CrashingOnDebugAssertTestProject.dll"); + var assemblyPath = GetAssetFullPath("CrashingOnDebugAssertTestProject.dll"); var arguments = PrepareArguments(assemblyPath, null, null, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); InvokeVsTest(arguments); diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/DotnetTestTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/DotnetTestTests.cs index 0ec673e7f8..ee32a307d5 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/DotnetTestTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/DotnetTestTests.cs @@ -37,7 +37,7 @@ public void RunDotnetTestWithDll(RunnerInfo runnerInfo) { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPath = BuildMultipleAssemblyPath("SimpleTestProject.dll"); + var assemblyPath = GetAssetFullPath("SimpleTestProject.dll"); InvokeDotnetTest($@"{assemblyPath} --logger:""Console;Verbosity=normal"""); // ensure our dev version is used @@ -70,7 +70,7 @@ public void RunDotnetTestWithDllPassInlineSettings(RunnerInfo runnerInfo) { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPath = BuildMultipleAssemblyPath("ParametrizedTestProject.dll"); + var assemblyPath = GetAssetFullPath("ParametrizedTestProject.dll"); InvokeDotnetTest($@"{assemblyPath} --logger:""Console;Verbosity=normal"" -- TestRunParameters.Parameter(name=\""weburl\"", value=\""http://localhost//def\"")"); ValidateSummaryStatus(1, 0, 0); diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs index 69a8e8f227..5a776d11f2 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs @@ -94,7 +94,7 @@ public void RunMultipleTestAssembliesWithoutTestAdapterPath(RunnerInfo runnerInf { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject.dll"); var xunitAssemblyPath = _testEnvironment.GetTestAsset("XUTestProject.dll"); assemblyPaths = string.Join(" ", assemblyPaths, xunitAssemblyPath.AddDoubleQuote()); @@ -143,7 +143,7 @@ public void TestSessionTimeOutTests(RunnerInfo runnerInfo) SetTestEnvironment(_testEnvironment, runnerInfo); var assemblyPaths = - BuildMultipleAssemblyPath("SimpleTestProject3.dll"); + GetAssetFullPath("SimpleTestProject3.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); arguments = string.Concat(arguments, " /TestCaseFilter:TestSessionTimeoutTest"); @@ -163,7 +163,7 @@ public void TestPlatformShouldBeCompatibleWithOldTestHost(RunnerInfo runnerInfo) { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SampleProjectWithOldTestHost.dll"); + var assemblyPaths = GetAssetFullPath("SampleProjectWithOldTestHost.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); InvokeVsTest(arguments); @@ -179,7 +179,7 @@ public void WorkingDirectoryIsSourceDirectory(RunnerInfo runnerInfo) { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject3.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject3.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); arguments = string.Concat(arguments, " /tests:WorkingDirectoryTest"); @@ -206,7 +206,7 @@ public void StackOverflowExceptionShouldBeLoggedToConsoleAndDiagLogFile(RunnerIn var diagLogFilePath = Path.Combine(TempDirectory.Path, $"std_error_log_{Guid.NewGuid()}.txt"); File.Delete(diagLogFilePath); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject3.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject3.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); arguments = string.Concat(arguments, " /testcasefilter:ExitWithStackoverFlow"); arguments = string.Concat(arguments, $" /diag:{diagLogFilePath}"); @@ -236,7 +236,7 @@ public void UnhandleExceptionExceptionShouldBeLoggedToDiagLogFile(RunnerInfo run File.Delete(diagLogFilePath); var assemblyPaths = - BuildMultipleAssemblyPath("SimpleTestProject3.dll"); + GetAssetFullPath("SimpleTestProject3.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); arguments = string.Concat(arguments, " /testcasefilter:ExitwithUnhandleException"); arguments = string.Concat(arguments, $" /diag:{diagLogFilePath}"); @@ -282,7 +282,7 @@ public void NoIncompatibleSourcesWarningShouldBeDisplayedInTheConsoleWhenGivenSi var expectedWarningContains = @"Following DLL(s) do not match current settings, which are .NETFramework,Version=v4.6.2 framework and X86 platform. SimpleTestProjectx86 would use Framework .NETFramework,Version=v4.6.2 and Platform X86"; var assemblyPaths = - BuildMultipleAssemblyPath("SimpleTestProjectx86.dll"); + GetAssetFullPath("SimpleTestProjectx86.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); InvokeVsTest(arguments); @@ -302,7 +302,7 @@ public void IncompatibleSourcesWarningShouldBeDisplayedInTheConsoleOnlyWhenRunni var expectedWarningContains = @"Following DLL(s) do not match current settings, which are .NETFramework,Version=v4.6.2 framework and X86 platform. SimpleTestProject2.dll would use Framework .NETFramework,Version=v4.6.2 and Platform X64"; var assemblyPaths = - BuildMultipleAssemblyPath("SimpleTestProject2.dll"); + GetAssetFullPath("SimpleTestProject2.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); InvokeVsTest(arguments); @@ -330,7 +330,7 @@ public void ExitCodeShouldReturnOneWhenTreatNoTestsAsErrorParameterSetToTrueAndN { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject2.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject2.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); @@ -350,7 +350,7 @@ public void ExitCodeShouldReturnZeroWhenTreatNoTestsAsErrorParameterSetToFalseAn { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject2.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject2.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); // Setting /TestCaseFilter to the test name, which does not exists in the assembly, so we will have 0 tests executed @@ -369,7 +369,7 @@ public void ExitCodeShouldNotDependOnTreatNoTestsAsErrorTrueValueWhenThereAreAny { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject2.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject2.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); @@ -387,7 +387,7 @@ public void ExitCodeShouldNotDependOnFailTreatNoTestsAsErrorFalseValueWhenThereA { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject2.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject2.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); arguments = string.Concat(arguments, " -- RunConfiguration.TreatNoTestsAsError=false"); diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionThreadApartmentStateTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionThreadApartmentStateTests.cs index c60abaa780..2a1c903c4c 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionThreadApartmentStateTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionThreadApartmentStateTests.cs @@ -16,7 +16,7 @@ public void UITestShouldPassIfApartmentStateIsSTA(RunnerInfo runnerInfo) { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = BuildMultipleAssemblyPath("SimpleTestProject3.dll"); + var assemblyPaths = GetAssetFullPath("SimpleTestProject3.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); arguments = string.Concat(arguments, " /testcasefilter:UITestMethod"); InvokeVsTest(arguments); @@ -30,7 +30,7 @@ public void WarningShouldBeShownWhenValueIsSTAForNetCore(RunnerInfo runnerInfo) SetTestEnvironment(_testEnvironment, runnerInfo); var assemblyPaths = - BuildMultipleAssemblyPath("SimpleTestProject2.dll"); + GetAssetFullPath("SimpleTestProject2.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); arguments = string.Concat(arguments, " /testcasefilter:PassingTest2 -- RunConfiguration.ExecutionThreadApartmentState=STA"); InvokeVsTest(arguments); @@ -45,7 +45,7 @@ public void UITestShouldFailWhenDefaultApartmentStateIsMTA(RunnerInfo runnerInfo SetTestEnvironment(_testEnvironment, runnerInfo); var assemblyPaths = - BuildMultipleAssemblyPath("SimpleTestProject3.dll"); + GetAssetFullPath("SimpleTestProject3.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); arguments = string.Concat(arguments, " /testcasefilter:UITestMethod -- RunConfiguration.ExecutionThreadApartmentState=MTA"); InvokeVsTest(arguments); @@ -60,7 +60,7 @@ public void CancelTestExectionShouldWorkWhenApartmentStateIsSTA(RunnerInfo runne SetTestEnvironment(_testEnvironment, runnerInfo); var assemblyPaths = - BuildMultipleAssemblyPath("SimpleTestProject3.dll"); + GetAssetFullPath("SimpleTestProject3.dll"); var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); arguments = string.Concat(arguments, " /tests:UITestWithSleep1,UITestMethod -- RunConfiguration.ExecutionThreadApartmentState=STA RunConfiguration.TestSessionTimeout=2000"); InvokeVsTest(arguments); diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/MultitargetingTestHostTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/MultitargetingTestHostTests.cs index 17c5c689d4..aa90fc1833 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/MultitargetingTestHostTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/MultitargetingTestHostTests.cs @@ -21,7 +21,7 @@ public void TestRunInATesthostThatTargetsTheirChosenNETFramework(RunnerInfo runn { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPath = BuildMultipleAssemblyPath("MultitargetedNetFrameworkProject.dll"); + var assemblyPath = GetAssetFullPath("MultitargetedNetFrameworkProject.dll"); var arguments = PrepareArguments(assemblyPath, null, null, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); // Tell the test project which target framework we are expecting it to run as. diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/RecursiveResourcesLookupTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/RecursiveResourcesLookupTests.cs index 3978dfef2a..db9d8fb31a 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/RecursiveResourcesLookupTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/RecursiveResourcesLookupTests.cs @@ -17,7 +17,7 @@ public void RunsToCompletionWhenJapaneseResourcesAreLookedUpForMSCorLib(RunnerIn { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPath = BuildMultipleAssemblyPath("RecursiveResourceLookupCrash.dll"); + var assemblyPath = GetAssetFullPath("RecursiveResourceLookupCrash.dll"); var arguments = PrepareArguments(assemblyPath, null, null, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); InvokeVsTest(arguments); diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/SelfContainedAppTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/SelfContainedAppTests.cs index 0f55c5147a..fdfddcd95b 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/SelfContainedAppTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/SelfContainedAppTests.cs @@ -23,7 +23,7 @@ public void RunningApplicationThatIsBuiltAsSelfContainedWillNotFailToFindHostpol SetTestEnvironment(_testEnvironment, runnerInfo); // the app is published to win10-x64 because of the runtime identifier in the project - var assemblyPath = BuildMultipleAssemblyPath($@"win10-x64{Path.DirectorySeparatorChar}SelfContainedAppTestProject.dll"); + var assemblyPath = GetAssetFullPath($@"win10-x64{Path.DirectorySeparatorChar}SelfContainedAppTestProject.dll"); var arguments = PrepareArguments(assemblyPath, null, null, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path); InvokeVsTest(arguments); diff --git a/test/Microsoft.TestPlatform.SmokeTests/DataCollectorTests.Coverlet.cs b/test/Microsoft.TestPlatform.SmokeTests/DataCollectorTests.Coverlet.cs index 18e1a7ceed..d85927dd14 100644 --- a/test/Microsoft.TestPlatform.SmokeTests/DataCollectorTests.Coverlet.cs +++ b/test/Microsoft.TestPlatform.SmokeTests/DataCollectorTests.Coverlet.cs @@ -31,7 +31,7 @@ public void RunCoverletCoverage() string coverletAdapterPath = Path.GetDirectoryName(Directory.GetFiles(_testEnvironment.GetNugetPackage("coverlet.collector"), "coverlet.collector.dll", SearchOption.AllDirectories).Single())!; string logId = Guid.NewGuid().ToString("N"); - string assemblyPath = BuildMultipleAssemblyPath("CoverletCoverageTestProject.dll").Trim('\"'); + string assemblyPath = GetAssetFullPath("CoverletCoverageTestProject.dll").Trim('\"'); string logPath = Path.Combine(Path.GetDirectoryName(assemblyPath)!, $"coverletcoverage.{logId}.log"); string logPathDirectory = Path.GetDirectoryName(logPath)!; string argument = $"--collect:{"XPlat Code Coverage".AddDoubleQuote()} {PrepareArguments(assemblyPath, coverletAdapterPath, "", ".NETCoreApp,Version=v2.1", resultsDirectory: resultsDir.Path)} --diag:{logPath.AddDoubleQuote()}"; From 887ea57bbef07b18dc91e70703572fa510007d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Mon, 3 Apr 2023 18:38:54 +0200 Subject: [PATCH 2/2] Add quotes --- .../ExecutionTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.TestPlatform.Acceptance.IntegrationTests/ExecutionTests.cs b/test/Microsoft.TestPlatform.Acceptance.IntegrationTests/ExecutionTests.cs index bb7948436e..ccb91de4fe 100644 --- a/test/Microsoft.TestPlatform.Acceptance.IntegrationTests/ExecutionTests.cs +++ b/test/Microsoft.TestPlatform.Acceptance.IntegrationTests/ExecutionTests.cs @@ -94,11 +94,11 @@ public void RunMultipleTestAssembliesWithoutTestAdapterPath(RunnerInfo runnerInf { SetTestEnvironment(_testEnvironment, runnerInfo); - var assemblyPaths = GetAssetFullPath("SimpleTestProject.dll"); + var assemblyPath = GetAssetFullPath("SimpleTestProject.dll"); var xunitAssemblyPath = _testEnvironment.GetTestAsset("XUTestProject.dll"); - assemblyPaths = string.Join(" ", assemblyPaths, xunitAssemblyPath.AddDoubleQuote()); - InvokeVsTestForExecution(assemblyPaths, testAdapterPath: string.Empty, FrameworkArgValue, string.Empty); + assemblyPath = string.Join(" ", assemblyPath.AddDoubleQuote(), xunitAssemblyPath.AddDoubleQuote()); + InvokeVsTestForExecution(assemblyPath, testAdapterPath: string.Empty, FrameworkArgValue, string.Empty); ValidateSummaryStatus(2, 2, 1); ExitCodeEquals(1); // failing tests