From 423f681325b0f2030ecc78843ae8404754d6f2af Mon Sep 17 00:00:00 2001 From: Medeni Baykal <433724+Haplois@users.noreply.github.com> Date: Wed, 4 Nov 2020 14:24:33 +0100 Subject: [PATCH] Fixed StackOverflowException when resolving Assemblies. --- TestFx.sln | 1 + scripts/Build.ps1 | 6 ++--- scripts/build/TestFx.Versions.targets | 4 +-- .../MSTest.CoreAdapter.csproj | 6 ++--- .../MSTest.CoreAdapter/packages.config | 2 +- .../AssemblyResolver.cs | 14 +++++++++-- .../PlatformServices.Desktop.csproj | 6 ++--- .../PlatformServices.Desktop/packages.config | 2 +- .../PlatformServices.Interface.csproj | 6 ++--- .../packages.config | 2 +- .../PlatformServices.NetCore.csproj | 2 +- .../PlatformServices.Portable.csproj | 6 ++--- .../PlatformServices.Portable/packages.config | 2 +- ...ormServices.Desktop.Component.Tests.csproj | 6 ++--- .../packages.config | 2 +- .../Automation.CLI/Automation.CLI.csproj | 25 +++++++++---------- test/E2ETests/Automation.CLI/CLITestBase.cs | 2 +- test/E2ETests/Automation.CLI/packages.config | 6 ++--- .../Smoke.E2E.Tests/DeploymentTests.cs | 19 +++++++++++--- test/E2ETests/Smoke.E2E.Tests/TimeoutTests.cs | 5 ++-- .../DeploymentTestProjectNetCore.csproj | 10 ++++---- .../TimeoutTestProjectNetCore.csproj | 6 ++--- .../MSTest.CoreAdapter.Unit.Tests.csproj | 6 ++--- .../packages.config | 2 +- ...PlatformServices.Desktop.Unit.Tests.csproj | 6 ++--- .../packages.config | 2 +- ...PlatformServices.NetCore.Unit.Tests.csproj | 3 ++- ...latformServices.Portable.Unit.Tests.csproj | 6 ++--- .../packages.config | 2 +- ...atformServices.Universal.Unit.Tests.csproj | 6 ++--- .../packages.config | 2 +- 31 files changed, 100 insertions(+), 75 deletions(-) diff --git a/TestFx.sln b/TestFx.sln index 6441825168..33d02154c5 100644 --- a/TestFx.sln +++ b/TestFx.sln @@ -142,6 +142,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "targets", "targets", "{F60B ProjectSection(SolutionItems) = preProject scripts\build\TestFx.Loc.targets = scripts\build\TestFx.Loc.targets scripts\build\TestFx.Settings.targets = scripts\build\TestFx.Settings.targets + scripts\build\TestFx.Versions.targets = scripts\build\TestFx.Versions.targets scripts\build\TestFx.targets = scripts\build\TestFx.targets EndProjectSection EndProject diff --git a/scripts/Build.ps1 b/scripts/Build.ps1 index a24656bbb9..3d6c1b23bc 100644 --- a/scripts/Build.ps1 +++ b/scripts/Build.ps1 @@ -307,14 +307,14 @@ function Replace-InFile($File, $RegEx, $ReplaceWith) { function Sync-PackageVersions { $versionsFile = "$PSScriptRoot\build\TestFx.Versions.targets" - $versionsRegex = '(?mi)<(TestPlatfromVersion.*?)>(.*?)<\/TestPlatfromVersion>' + $versionsRegex = '(?mi)<(TestPlatformVersion.*?)>(.*?)<\/TestPlatformVersion>' $packageRegex = '(?mi)$TestPlatformVersion" + Replace-InFile -File $versionsFile -RegEx $versionsRegex -ReplaceWith "<`$1>$TestPlatformVersion" } (Get-ChildItem "$PSScriptRoot\..\src\*packages.config","$PSScriptRoot\..\test\*packages.config" -Recurse) | ForEach-Object { diff --git a/scripts/build/TestFx.Versions.targets b/scripts/build/TestFx.Versions.targets index b4199901b3..87181c7abd 100644 --- a/scripts/build/TestFx.Versions.targets +++ b/scripts/build/TestFx.Versions.targets @@ -1,7 +1,7 @@ - + - 16.9.0-preview-20201102-05 + 16.9.0-preview-20201107-01 11.0 \ No newline at end of file diff --git a/src/Adapter/MSTest.CoreAdapter/MSTest.CoreAdapter.csproj b/src/Adapter/MSTest.CoreAdapter/MSTest.CoreAdapter.csproj index 6c8e04fba7..955d2bd932 100644 --- a/src/Adapter/MSTest.CoreAdapter/MSTest.CoreAdapter.csproj +++ b/src/Adapter/MSTest.CoreAdapter/MSTest.CoreAdapter.csproj @@ -116,13 +116,13 @@ - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\netstandard1.0\Microsoft.TestPlatform.CoreUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.TestPlatform.CoreUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\netstandard1.0\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\System.Collections.Concurrent.dll diff --git a/src/Adapter/MSTest.CoreAdapter/packages.config b/src/Adapter/MSTest.CoreAdapter/packages.config index b6e09d947a..d19813ad6c 100644 --- a/src/Adapter/MSTest.CoreAdapter/packages.config +++ b/src/Adapter/MSTest.CoreAdapter/packages.config @@ -1,7 +1,7 @@  - + diff --git a/src/Adapter/PlatformServices.Desktop/AssemblyResolver.cs b/src/Adapter/PlatformServices.Desktop/AssemblyResolver.cs index 26b489c009..11cfe5703a 100644 --- a/src/Adapter/PlatformServices.Desktop/AssemblyResolver.cs +++ b/src/Adapter/PlatformServices.Desktop/AssemblyResolver.cs @@ -12,6 +12,7 @@ namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices using System.Runtime.InteropServices.WindowsRuntime; using System.Security; using System.Security.Permissions; + using Microsoft.VisualStudio.TestPlatform.ObjectModel; /// @@ -28,7 +29,16 @@ public class AssemblyResolver : MarshalByRefObject, IDisposable /// The reason we have this is because the AssemblyResolver itself logs information during resolution. /// If the resolver is called for the assembly containing the logger APIs, we do not log so as to prevent a stack overflow. /// - private const string LoggerAssemblyName = "Microsoft.VisualStudio.TestPlatform.ObjectModel"; + private const string LoggerAssemblyNameLegacy = "Microsoft.VisualStudio.TestPlatform.ObjectModel"; + + /// + /// The assembly name of the dll containing logger APIs(EqtTrace) from the TestPlatform. + /// + /// + /// The reason we have this is because the AssemblyResolver itself logs information during resolution. + /// If the resolver is called for the assembly containing the logger APIs, we do not log so as to prevent a stack overflow. + /// + private const string LoggerAssemblyName = "Microsoft.TestPlatform.CoreUtilities"; /// /// This will have the list of all directories read from runsettings. @@ -577,7 +587,7 @@ private bool TryLoadFromCache(string assemblyName, bool isReflectionOnly, out As /// The logger function. private void SafeLog(string assemblyName, Action loggerAction) { - if (!string.IsNullOrEmpty(assemblyName) && !assemblyName.StartsWith(LoggerAssemblyName)) + if (!string.IsNullOrEmpty(assemblyName) && !assemblyName.StartsWith(LoggerAssemblyName) && !assemblyName.StartsWith(LoggerAssemblyNameLegacy)) { loggerAction.Invoke(); } diff --git a/src/Adapter/PlatformServices.Desktop/PlatformServices.Desktop.csproj b/src/Adapter/PlatformServices.Desktop/PlatformServices.Desktop.csproj index ef1c68d319..0c04867a71 100644 --- a/src/Adapter/PlatformServices.Desktop/PlatformServices.Desktop.csproj +++ b/src/Adapter/PlatformServices.Desktop/PlatformServices.Desktop.csproj @@ -31,13 +31,13 @@ - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net45\Microsoft.TestPlatform.CoreUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net45\Microsoft.TestPlatform.CoreUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net45\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net45\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net45\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net45\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll ..\..\..\packages\NuGet.Frameworks.5.0.0\lib\net40\NuGet.Frameworks.dll diff --git a/src/Adapter/PlatformServices.Desktop/packages.config b/src/Adapter/PlatformServices.Desktop/packages.config index 94fb08141c..2a8c0935ec 100644 --- a/src/Adapter/PlatformServices.Desktop/packages.config +++ b/src/Adapter/PlatformServices.Desktop/packages.config @@ -1,7 +1,7 @@  - + diff --git a/src/Adapter/PlatformServices.Interface/PlatformServices.Interface.csproj b/src/Adapter/PlatformServices.Interface/PlatformServices.Interface.csproj index 5775f07da3..b7a861970b 100644 --- a/src/Adapter/PlatformServices.Interface/PlatformServices.Interface.csproj +++ b/src/Adapter/PlatformServices.Interface/PlatformServices.Interface.csproj @@ -64,13 +64,13 @@ - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\netstandard1.0\Microsoft.TestPlatform.CoreUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.TestPlatform.CoreUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\netstandard1.0\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll ..\..\..\packages\System.ComponentModel.Primitives.4.3.0\lib\netstandard1.0\System.ComponentModel.Primitives.dll diff --git a/src/Adapter/PlatformServices.Interface/packages.config b/src/Adapter/PlatformServices.Interface/packages.config index b6e09d947a..d19813ad6c 100644 --- a/src/Adapter/PlatformServices.Interface/packages.config +++ b/src/Adapter/PlatformServices.Interface/packages.config @@ -1,7 +1,7 @@  - + diff --git a/src/Adapter/PlatformServices.NetCore/PlatformServices.NetCore.csproj b/src/Adapter/PlatformServices.NetCore/PlatformServices.NetCore.csproj index 91b6c1d14d..fe1ba4baa9 100644 --- a/src/Adapter/PlatformServices.NetCore/PlatformServices.NetCore.csproj +++ b/src/Adapter/PlatformServices.NetCore/PlatformServices.NetCore.csproj @@ -66,7 +66,7 @@ - + diff --git a/src/Adapter/PlatformServices.Portable/PlatformServices.Portable.csproj b/src/Adapter/PlatformServices.Portable/PlatformServices.Portable.csproj index f31516f6a5..103ddb3173 100644 --- a/src/Adapter/PlatformServices.Portable/PlatformServices.Portable.csproj +++ b/src/Adapter/PlatformServices.Portable/PlatformServices.Portable.csproj @@ -105,13 +105,13 @@ - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\netstandard1.0\Microsoft.TestPlatform.CoreUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.TestPlatform.CoreUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\netstandard1.0\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll ..\..\..\packages\System.ComponentModel.Primitives.4.3.0\lib\netstandard1.0\System.ComponentModel.Primitives.dll diff --git a/src/Adapter/PlatformServices.Portable/packages.config b/src/Adapter/PlatformServices.Portable/packages.config index b6e09d947a..d19813ad6c 100644 --- a/src/Adapter/PlatformServices.Portable/packages.config +++ b/src/Adapter/PlatformServices.Portable/packages.config @@ -1,7 +1,7 @@  - + diff --git a/test/ComponentTests/PlatformServices.Desktop.Component.Tests/PlatformServices.Desktop.Component.Tests.csproj b/test/ComponentTests/PlatformServices.Desktop.Component.Tests/PlatformServices.Desktop.Component.Tests.csproj index e399b662e7..53c1b60897 100644 --- a/test/ComponentTests/PlatformServices.Desktop.Component.Tests/PlatformServices.Desktop.Component.Tests.csproj +++ b/test/ComponentTests/PlatformServices.Desktop.Component.Tests/PlatformServices.Desktop.Component.Tests.csproj @@ -42,13 +42,13 @@ ..\..\..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll ..\..\..\packages\Moq.4.8.2\lib\net45\Moq.dll diff --git a/test/ComponentTests/PlatformServices.Desktop.Component.Tests/packages.config b/test/ComponentTests/PlatformServices.Desktop.Component.Tests/packages.config index d2f7338d17..629dc07d37 100644 --- a/test/ComponentTests/PlatformServices.Desktop.Component.Tests/packages.config +++ b/test/ComponentTests/PlatformServices.Desktop.Component.Tests/packages.config @@ -1,7 +1,7 @@  - + diff --git a/test/E2ETests/Automation.CLI/Automation.CLI.csproj b/test/E2ETests/Automation.CLI/Automation.CLI.csproj index 0140fff639..dcfc774e08 100644 --- a/test/E2ETests/Automation.CLI/Automation.CLI.csproj +++ b/test/E2ETests/Automation.CLI/Automation.CLI.csproj @@ -33,22 +33,22 @@ - ..\..\..\packages\Microsoft.TestPlatform.TranslationLayer.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.CommunicationUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.TranslationLayer.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.CommunicationUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.TranslationLayer.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.TranslationLayer.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.TranslationLayer.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\..\..\packages\Microsoft.TestPlatform.TranslationLayer.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\..\..\packages\Microsoft.TestPlatform.TranslationLayer.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.VsTestConsole.TranslationLayer.dll + ..\..\..\packages\Microsoft.TestPlatform.TranslationLayer.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.VsTestConsole.TranslationLayer.dll - ..\..\..\packages\Microsoft.TestPlatform.TranslationLayer.$(TestPlatfromVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.Common.dll + ..\..\..\packages\Microsoft.TestPlatform.TranslationLayer.$(TestPlatformVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.Common.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll ..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll @@ -111,6 +111,12 @@ xcopy /Y /I "$(SourcePath)PlatformServices.NetCore\netstandard1.5\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.pdb" "$(DestinationPath)\netcoreapp1.1\" xcopy /Y /I "$(SourcePath)PlatformServices.NetCore\netstandard1.5\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll" "$(DestinationPath)\netcoreapp1.1\" xcopy /Y /I "$(SourcePath)PlatformServices.NetCore\netstandard1.5\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.pdb" "$(DestinationPath)\netcoreapp1.1\" + xcopy /Y /I "$(SourcePath)MSTest.CoreAdapter\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" "$(DestinationPath)\netcoreapp2.1\" + xcopy /Y /I "$(SourcePath)MSTest.CoreAdapter\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.pdb" "$(DestinationPath)\netcoreapp2.1\" + xcopy /Y /I "$(SourcePath)PlatformServices.NetCore\netstandard1.5\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" "$(DestinationPath)\netcoreapp2.1\" + xcopy /Y /I "$(SourcePath)PlatformServices.NetCore\netstandard1.5\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.pdb" "$(DestinationPath)\netcoreapp2.1\" + xcopy /Y /I "$(SourcePath)PlatformServices.NetCore\netstandard1.5\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll" "$(DestinationPath)\netcoreapp2.1\" + xcopy /Y /I "$(SourcePath)PlatformServices.NetCore\netstandard1.5\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.pdb" "$(DestinationPath)\netcoreapp2.1\" xcopy /Y /I "$(SourcePath)PlatformServices.Interface\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll" "$(DestinationPath)" xcopy /Y /I "$(SourcePath)PlatformServices.Interface\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.pdb" "$(DestinationPath)" xcopy /Y /I "$(SourcePath)MSTest.Core\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "$(DestinationPath)" @@ -119,11 +125,4 @@ xcopy /Y /I "$(SourcePath)Extension.Desktop\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.pdb" "$(DestinationPath)" - \ No newline at end of file diff --git a/test/E2ETests/Automation.CLI/CLITestBase.cs b/test/E2ETests/Automation.CLI/CLITestBase.cs index 5bc95cf53f..39ca2aec60 100644 --- a/test/E2ETests/Automation.CLI/CLITestBase.cs +++ b/test/E2ETests/Automation.CLI/CLITestBase.cs @@ -19,7 +19,7 @@ public class CLITestBase private const string PackagesFolder = "packages"; // This value is automatically updated by "build.ps1" script. - private const string TestPlatformCLIPackage = @"Microsoft.TestPlatform.16.9.0-preview-20201102-05"; + private const string TestPlatformCLIPackage = @"Microsoft.TestPlatform.16.9.0-preview-20201107-01"; private const string VstestConsoleRelativePath = @"tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"; private static VsTestConsoleWrapper vsTestConsoleWrapper; diff --git a/test/E2ETests/Automation.CLI/packages.config b/test/E2ETests/Automation.CLI/packages.config index 4842178792..0c97245e93 100644 --- a/test/E2ETests/Automation.CLI/packages.config +++ b/test/E2ETests/Automation.CLI/packages.config @@ -1,8 +1,8 @@  - - - + + + diff --git a/test/E2ETests/Smoke.E2E.Tests/DeploymentTests.cs b/test/E2ETests/Smoke.E2E.Tests/DeploymentTests.cs index c2295d8b7c..9c9222659c 100644 --- a/test/E2ETests/Smoke.E2E.Tests/DeploymentTests.cs +++ b/test/E2ETests/Smoke.E2E.Tests/DeploymentTests.cs @@ -10,7 +10,8 @@ namespace MSTestAdapter.Smoke.E2ETests public class DeploymentTests : CLITestBase { private const string TestAssembly = "DesktopDeployment\\DeploymentTestProject.dll"; - private const string TestAssemblyNetCore = "netcoreapp1.1\\DeploymentTestProjectNetCore.dll"; + private const string TestAssemblyNetCore10 = "netcoreapp1.0\\DeploymentTestProjectNetCore.dll"; + private const string TestAssemblyNetCore21 = "netcoreapp2.1\\DeploymentTestProjectNetCore.dll"; private const string RunSetting = @" @@ -34,10 +35,22 @@ public void ValidateTestSourceLocationDeployment() this.ValidateFailedTestsContain("DeploymentTestProject.dll", true, "DeploymentTestProject.UnitTest1.FailIfFilePresent"); } + /* + * This test is disabled because testhost in netcoreapp1.0 is broken for now. + + [TestMethod] + public void ValidateTestSourceLocationDeploymentNetCore1_0() + { + this.InvokeVsTestForExecution(new string[] { TestAssemblyNetCore10 }, null); + this.ValidatePassedTestsContain("DeploymentTestProjectNetCore.DeploymentTestProjectNetCore.FailIfFilePresent", "DeploymentTestProjectNetCore.DeploymentTestProjectNetCore.PassIfDeclaredFilesPresent"); + this.ValidateFailedTestsContain("DeploymentTestProjectNetCore.dll", true, "DeploymentTestProjectNetCore.DeploymentTestProjectNetCore.PassIfFilePresent"); + } + */ + [TestMethod] - public void ValidateTestSourceLocationDeploymentNetCore() + public void ValidateTestSourceLocationDeploymentNetCore2_1() { - this.InvokeVsTestForExecution(new string[] { TestAssemblyNetCore }, null); + this.InvokeVsTestForExecution(new string[] { TestAssemblyNetCore21 }, null); this.ValidatePassedTestsContain("DeploymentTestProjectNetCore.DeploymentTestProjectNetCore.FailIfFilePresent", "DeploymentTestProjectNetCore.DeploymentTestProjectNetCore.PassIfDeclaredFilesPresent"); this.ValidateFailedTestsContain("DeploymentTestProjectNetCore.dll", true, "DeploymentTestProjectNetCore.DeploymentTestProjectNetCore.PassIfFilePresent"); } diff --git a/test/E2ETests/Smoke.E2E.Tests/TimeoutTests.cs b/test/E2ETests/Smoke.E2E.Tests/TimeoutTests.cs index b325537948..8f7076d7fa 100644 --- a/test/E2ETests/Smoke.E2E.Tests/TimeoutTests.cs +++ b/test/E2ETests/Smoke.E2E.Tests/TimeoutTests.cs @@ -4,6 +4,7 @@ namespace MSTestAdapter.Smoke.E2ETests { using System.IO; + using Microsoft.MSTestV2.CLIAutomation; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -11,10 +12,10 @@ namespace MSTestAdapter.Smoke.E2ETests public class TimeoutTests : CLITestBase { private const string TimeoutTestAssembly = "TimeoutTestProject.dll"; - private const string TimeoutTestAssemblyNetCore = "netcoreapp1.1\\TimeoutTestProjectNetCore.dll"; + private const string TimeoutTestAssemblyNetCore = "netcoreapp2.1\\TimeoutTestProjectNetCore.dll"; private const int TestMethodWaitTimeInMs = 6000; private const int OverheadTimeInMs = 2500; - private const string TimeoutFileToValidateNetCore = "netcoreapp1.1\\TimeoutTestOutputNetCore.txt"; + private const string TimeoutFileToValidateNetCore = "netcoreapp2.1\\TimeoutTestOutputNetCore.txt"; private const string TimeoutFileToValidate = "TimeoutTestOutput.txt"; [TestMethod] diff --git a/test/E2ETests/TestAssets/DeploymentTestProjectNetCore/DeploymentTestProjectNetCore.csproj b/test/E2ETests/TestAssets/DeploymentTestProjectNetCore/DeploymentTestProjectNetCore.csproj index d7bfaf2351..7b2d10c534 100644 --- a/test/E2ETests/TestAssets/DeploymentTestProjectNetCore/DeploymentTestProjectNetCore.csproj +++ b/test/E2ETests/TestAssets/DeploymentTestProjectNetCore/DeploymentTestProjectNetCore.csproj @@ -1,20 +1,20 @@  ..\..\..\..\ + false - netcoreapp1.1 + netcoreapp1.0;netcoreapp2.1 NetCore false - false - $(PackageTargetFallback);portable-net45+win8+wpa81+wp8 - $(TestFxRoot)artifacts\TestAssets\netcoreapp1.1\ + $(PackageTargetFallback);portable-net45+win8+wpa81+wp8 + $(TestFxRoot)artifacts\TestAssets\ - + diff --git a/test/E2ETests/TestAssets/TimeoutTestProjectNetCore/TimeoutTestProjectNetCore.csproj b/test/E2ETests/TestAssets/TimeoutTestProjectNetCore/TimeoutTestProjectNetCore.csproj index ea45ba6bf3..d4cee39ff3 100644 --- a/test/E2ETests/TestAssets/TimeoutTestProjectNetCore/TimeoutTestProjectNetCore.csproj +++ b/test/E2ETests/TestAssets/TimeoutTestProjectNetCore/TimeoutTestProjectNetCore.csproj @@ -5,15 +5,15 @@ - netcoreapp1.1 + netcoreapp2.1 NetCore false false - $(TestFxRoot)artifacts\TestAssets\netcoreapp1.1\ + $(TestFxRoot)artifacts\TestAssets\netcoreapp2.1\ - + diff --git a/test/UnitTests/MSTest.CoreAdapter.Unit.Tests/MSTest.CoreAdapter.Unit.Tests.csproj b/test/UnitTests/MSTest.CoreAdapter.Unit.Tests/MSTest.CoreAdapter.Unit.Tests.csproj index e02869db42..6369eb6a35 100644 --- a/test/UnitTests/MSTest.CoreAdapter.Unit.Tests/MSTest.CoreAdapter.Unit.Tests.csproj +++ b/test/UnitTests/MSTest.CoreAdapter.Unit.Tests/MSTest.CoreAdapter.Unit.Tests.csproj @@ -40,13 +40,13 @@ True - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll $(TestFxRoot)packages\Moq.4.5.21\lib\net45\Moq.dll diff --git a/test/UnitTests/MSTest.CoreAdapter.Unit.Tests/packages.config b/test/UnitTests/MSTest.CoreAdapter.Unit.Tests/packages.config index 6bf35a22c0..3600d8e1c5 100644 --- a/test/UnitTests/MSTest.CoreAdapter.Unit.Tests/packages.config +++ b/test/UnitTests/MSTest.CoreAdapter.Unit.Tests/packages.config @@ -1,7 +1,7 @@  - + diff --git a/test/UnitTests/PlatformServices.Desktop.Unit.Tests/PlatformServices.Desktop.Unit.Tests.csproj b/test/UnitTests/PlatformServices.Desktop.Unit.Tests/PlatformServices.Desktop.Unit.Tests.csproj index c06fbeb2ed..b060f52e7c 100644 --- a/test/UnitTests/PlatformServices.Desktop.Unit.Tests/PlatformServices.Desktop.Unit.Tests.csproj +++ b/test/UnitTests/PlatformServices.Desktop.Unit.Tests/PlatformServices.Desktop.Unit.Tests.csproj @@ -40,13 +40,13 @@ ..\..\..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll ..\..\..\packages\Moq.4.5.21\lib\net45\Moq.dll diff --git a/test/UnitTests/PlatformServices.Desktop.Unit.Tests/packages.config b/test/UnitTests/PlatformServices.Desktop.Unit.Tests/packages.config index cea276dbc7..ca83c45842 100644 --- a/test/UnitTests/PlatformServices.Desktop.Unit.Tests/packages.config +++ b/test/UnitTests/PlatformServices.Desktop.Unit.Tests/packages.config @@ -1,7 +1,7 @@  - + diff --git a/test/UnitTests/PlatformServices.NetCore.Unit.Tests/PlatformServices.NetCore.Unit.Tests.csproj b/test/UnitTests/PlatformServices.NetCore.Unit.Tests/PlatformServices.NetCore.Unit.Tests.csproj index 414f26e447..31ec9c809f 100644 --- a/test/UnitTests/PlatformServices.NetCore.Unit.Tests/PlatformServices.NetCore.Unit.Tests.csproj +++ b/test/UnitTests/PlatformServices.NetCore.Unit.Tests/PlatformServices.NetCore.Unit.Tests.csproj @@ -1,6 +1,7 @@  ..\..\..\ + false NetCore @@ -35,7 +36,7 @@ - + diff --git a/test/UnitTests/PlatformServices.Portable.Unit.Tests/PlatformServices.Portable.Unit.Tests.csproj b/test/UnitTests/PlatformServices.Portable.Unit.Tests/PlatformServices.Portable.Unit.Tests.csproj index c1a8d2b143..0e00c1f40d 100644 --- a/test/UnitTests/PlatformServices.Portable.Unit.Tests/PlatformServices.Portable.Unit.Tests.csproj +++ b/test/UnitTests/PlatformServices.Portable.Unit.Tests/PlatformServices.Portable.Unit.Tests.csproj @@ -39,16 +39,16 @@ True - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll FrameworkV1 - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll ..\..\..\packages\Moq.4.5.21\lib\net45\Moq.dll diff --git a/test/UnitTests/PlatformServices.Portable.Unit.Tests/packages.config b/test/UnitTests/PlatformServices.Portable.Unit.Tests/packages.config index 6bf35a22c0..3600d8e1c5 100644 --- a/test/UnitTests/PlatformServices.Portable.Unit.Tests/packages.config +++ b/test/UnitTests/PlatformServices.Portable.Unit.Tests/packages.config @@ -1,7 +1,7 @@  - + diff --git a/test/UnitTests/PlatformServices.Universal.Unit.Tests/PlatformServices.Universal.Unit.Tests.csproj b/test/UnitTests/PlatformServices.Universal.Unit.Tests/PlatformServices.Universal.Unit.Tests.csproj index 28097a3964..90b2cc525c 100644 --- a/test/UnitTests/PlatformServices.Universal.Unit.Tests/PlatformServices.Universal.Unit.Tests.csproj +++ b/test/UnitTests/PlatformServices.Universal.Unit.Tests/PlatformServices.Universal.Unit.Tests.csproj @@ -40,16 +40,16 @@ True - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.CoreUtilities.dll - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.TestPlatform.PlatformAbstractions.dll FrameworkV1 - ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatfromVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll + ..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net451\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll ..\..\..\packages\Moq.4.7.8\lib\net45\Moq.dll diff --git a/test/UnitTests/PlatformServices.Universal.Unit.Tests/packages.config b/test/UnitTests/PlatformServices.Universal.Unit.Tests/packages.config index a750ab2d04..4260b86236 100644 --- a/test/UnitTests/PlatformServices.Universal.Unit.Tests/packages.config +++ b/test/UnitTests/PlatformServices.Universal.Unit.Tests/packages.config @@ -1,7 +1,7 @@  - +