Skip to content

Commit 4872971

Browse files
authored
Moving to version 18 (#15209)
* version 18 start * use version that almost restores * Update versions to make it run with local patch * Add test for tpv0 * Update package versions to the ones that are patched to remove cuit * Skip CC tests and flaky debugger tests * Disable capture output to see errors and to avoid race condition
1 parent ece7f16 commit 4872971

File tree

7 files changed

+85
-25
lines changed

7 files changed

+85
-25
lines changed

Directory.Build.props

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,6 @@
1515
</PropertyGroup>
1616

1717
<PropertyGroup>
18-
<!--
19-
This version is read by vsts-prebuild.ps1 and is a base for the current version, this should be updated at the start of
20-
new iteration to the goal number. This is also used to version the local packages. This version needs to be statically
21-
readable when we read the file as xml, don't move it to a .props file, unless you change the build server process
22-
-->
23-
<TPVersionPrefix>17.10.0</TPVersionPrefix>
24-
<!--
25-
Versioning is defined from the build script. Use a default dev build if it's not defined.
26-
Sets the AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion
27-
-->
28-
<Version Condition="'$(Version)' == ''">$(TPVersionPrefix)-dev</Version>
2918
<!-- Override the AssemblyVersion as 15.0.0 since protocol depends on this version for serialization. This is also defined in build script. -->
3019
<AssemblyVersion Condition="'$(AssemblyVersion)' == ''">15.0.0</AssemblyVersion>
3120
<!-- Auto generating binding redirects breaks testhost when running under net8.0 vstest.console as .NET Framework net462. -->
@@ -147,6 +136,8 @@
147136
<TestRunnerName>MSTest</TestRunnerName>
148137
<!-- Skip windows only tests on non-windows systems. -->
149138
<TestRunnerAdditionalArguments Condition=" '$(OS)' != 'Windows_NT' ">$(TestRunnerAdditionalArguments) --filter "TestCategory!=Windows&amp;TestCategory!=Windows-Review"</TestRunnerAdditionalArguments>
139+
<!-- Do not capture test output on CI to help community see errors -->
140+
<TestCaptureOutput Condition=" '$(ContinuousIntegrationBuild)' == 'true' ">false</TestCaptureOutput>
150141
</PropertyGroup>
151142

152143
</Project>

eng/Versions.props

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from appending +<commitId>, which breaks DTAAgent.
1414
-->
1515
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
16-
<VersionPrefix>17.15.0</VersionPrefix>
16+
<VersionPrefix>18.0.0</VersionPrefix>
1717
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
1818
</PropertyGroup>
1919
<PropertyGroup Label="Arcade settings">
@@ -57,7 +57,7 @@
5757
Make sure you are taking a version from a release branch (rel/d*) in VS. Otherwise there won't be symbols for the dlls in package,
5858
a and it will create a symcheck bug on re-insertion into VS.
5959
-->
60-
<MicrosoftVisualStudioDiagnosticsUtilitiesVersion>17.13.35723.115</MicrosoftVisualStudioDiagnosticsUtilitiesVersion>
60+
<MicrosoftVisualStudioDiagnosticsUtilitiesVersion>18.0.0-preview-1-10811-208</MicrosoftVisualStudioDiagnosticsUtilitiesVersion>
6161
<MicrosoftVisualStudioEnterpriseAspNetHelper>$(MicrosoftVisualStudioDiagnosticsUtilitiesVersion)</MicrosoftVisualStudioEnterpriseAspNetHelper>
6262
<MicrosoftVisualStudioInteropVersion>17.13.39960</MicrosoftVisualStudioInteropVersion>
6363
<MicrosoftVSTelemetryVersion>17.13.24</MicrosoftVSTelemetryVersion>
@@ -69,8 +69,9 @@
6969
<SystemComponentModelCompositionVersion>8.0.0</SystemComponentModelCompositionVersion>
7070
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
7171
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
72-
<TestPlatformExternalsVersion>17.10.0-preview-2-34602-162</TestPlatformExternalsVersion>
73-
<MicrosoftInternalTestPlatformExtensions>17.10.0-preview-2-34602-162</MicrosoftInternalTestPlatformExtensions>
72+
<!-- <TestPlatformExternalsVersion>18.0.0-preview-1-10804-064</TestPlatformExternalsVersion> -->
73+
<TestPlatformExternalsVersion>18.0.0-preview-1-10811-208</TestPlatformExternalsVersion>
74+
<MicrosoftInternalTestPlatformExtensions>18.0.0-preview-1-10811-208</MicrosoftInternalTestPlatformExtensions>
7475
<TestPlatformMSDiaVersion>17.12.35519.223</TestPlatformMSDiaVersion>
7576
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>
7677
<SystemRuntimeCompilerServicesUnsafeVersion>6.1.0</SystemRuntimeCompilerServicesUnsafeVersion>

src/testhost.x86/app.config

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@
1818
</dependentAssembly>
1919
<dependentAssembly>
2020
<assemblyIdentity name="Microsoft.VisualStudio.TestWindow.Interfaces" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
21-
<bindingRedirect oldVersion="11.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
21+
<bindingRedirect oldVersion="11.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
2222
</dependentAssembly>
2323
<dependentAssembly>
2424
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.UnitTestFramework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
2525
<bindingRedirect oldVersion="10.1.0.0" newVersion="10.0.0.0" />
2626
</dependentAssembly>
2727
<dependentAssembly>
2828
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Resource" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
29-
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
29+
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
3030
</dependentAssembly>
3131
<dependentAssembly>
3232
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.ControllerObject" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
33-
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
33+
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
3434
</dependentAssembly>
3535
<dependentAssembly>
3636
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.ExecutionCommon" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
37-
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
37+
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
3838
</dependentAssembly>
3939
<dependentAssembly>
4040
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
41-
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
41+
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
4242
</dependentAssembly>
4343
<dependentAssembly>
4444
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
45-
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
45+
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
4646
</dependentAssembly>
4747
<dependentAssembly>
4848
<!-- Microsoft.Extensions.DependencyModel depends on version 9.0.0, and newer versions of that nuget don't support all the frameworks we need anymore. -->

src/vstest.console/app.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
<!-- Test adapters compiled against version 11-14, need to be redirected to version 15. -->
1515
<dependentAssembly>
1616
<assemblyIdentity name="Microsoft.VisualStudio.TestPlatform.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
17-
<bindingRedirect oldVersion="11.0.0.0-14.0.0.0" newVersion="15.0.0.0" />
17+
<bindingRedirect oldVersion="11.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
1818
</dependentAssembly>
1919
<dependentAssembly>
2020
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
21-
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
21+
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
2222
</dependentAssembly>
2323
<dependentAssembly>
2424
<!-- Microsoft.Extensions.DependencyModel depends on version 9.0.0, and newer versions of that nuget don't support all the frameworks we need anymore. -->

test/Microsoft.TestPlatform.Acceptance.IntegrationTests/TestPlatformNugetPackageTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public static void ClassInit(TestContext _)
2222

2323
[TestMethod]
2424
[TestCategory("Windows-Review")]
25+
[Ignore("Code Coverage is using 17.x.x dependency, will be solved in other PR. https://github.com/microsoft/vstest/issues/15223")]
2526
[NetFullTargetFrameworkDataSourceAttribute(useCoreRunner: false)]
2627
[NetCoreTargetFrameworkDataSourceAttribute(useCoreRunner: false)]
2728
public void RunMultipleTestAssembliesWithCodeCoverage(RunnerInfo runnerInfo)

test/Microsoft.TestPlatform.Acceptance.IntegrationTests/TranslationLayerTests/CustomTestHostTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ public void RunTestsWithCustomTestHostLauncherUsesLaunchWhenGivenAnOutdatedITest
143143
[TestMethod]
144144
[TestCategory("Windows-Review")]
145145
[TestCategory("Feature")]
146-
[RunnerCompatibilityDataSource(AfterFeature = Features.MULTI_TFM)]
146+
// "Just row" used here because mstest does not cooperate with older versions of vstest.console correctly, so we test with just the latest version available..
147+
[RunnerCompatibilityDataSource(AfterFeature = Features.MULTI_TFM, JustRow = 0)]
147148
public void RunAllTestsWithMixedTFMsWillProvideAdditionalInformationToTheDebugger(RunnerInfo runnerInfo)
148149
{
149150
// Arrange

test/Microsoft.TestPlatform.Acceptance.IntegrationTests/TranslationLayerTests/RunTestsWithDifferentConfigurationTests.cs

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public void RunTestsWithRunSettingsWithParallel(RunnerInfo runnerInfo)
102102
[TestMethod]
103103
[TestCategory("Windows-Review")]
104104
[NetFullTargetFrameworkDataSource()]
105-
public void RunTestsWithTestSettings(RunnerInfo runnerInfo)
105+
public void RunTestsWithTestSettingsInTpv2(RunnerInfo runnerInfo)
106106
{
107107
SetTestEnvironment(_testEnvironment, runnerInfo);
108108
ExecuteNotSupportedRunnerFrameworkTests(runnerInfo.RunnerFramework, NetFramework, Message);
@@ -130,6 +130,72 @@ public void RunTestsWithTestSettings(RunnerInfo runnerInfo)
130130
Assert.AreEqual(1, _runEventHandler.TestResults.Count(t => t.Outcome == TestOutcome.Skipped));
131131
}
132132

133+
[TestMethod]
134+
[TestCategory("Windows-Review")]
135+
[NetFullTargetFrameworkDataSource()]
136+
public void RunTestsWithTestSettingsInTpv0(RunnerInfo runnerInfo)
137+
{
138+
SetTestEnvironment(_testEnvironment, runnerInfo);
139+
ExecuteNotSupportedRunnerFrameworkTests(runnerInfo.RunnerFramework, NetFramework, Message);
140+
Setup();
141+
142+
var testSettingsXml = """
143+
<?xml version="1.0" encoding="UTF-8"?>
144+
<TestSettings name="VS19 repro." id="9b2f344b-e089-447e-8ed6-5e333b0a0361" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
145+
<Description>This is a default test run configuration for a local test run.</Description>
146+
<Deployment>
147+
<DeploymentItem filename="UnitTest1.cs" />
148+
</Deployment>
149+
<Execution hostProcessPlatform="MSIL">
150+
<Hosts skipUnhostableTests="false">
151+
<AspNet name="ASP.NET" executionType="WebDev" />
152+
<VSSDKTestHostRunConfig name="VS IDE" HiveKind="DevEnv" HiveName="10.0" xmlns="http://microsoft.com/schemas/VisualStudio/SDK/Tools/IdeHostAdapter/2006/06" />
153+
</Hosts>
154+
<Timeouts runTimeout="3540000" testTimeout="2400000" />
155+
<TestTypeSpecific>
156+
<WebTestRunConfiguration testTypeId="4e7599fa-5ecb-43e9-a887-cd63cf72d207">
157+
<Browser name="Internet Explorer 6.0">
158+
<Headers>
159+
<Header name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" />
160+
<Header name="Accept" value="*/*" />
161+
<Header name="Accept-Language" value="{{$IEAcceptLanguage}}" />
162+
<Header name="Accept-Encoding" value="GZIP" />
163+
</Headers>
164+
</Browser>
165+
</WebTestRunConfiguration>
166+
<UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
167+
<AssemblyResolution>
168+
<TestDirectory useLoadContext="true" />
169+
<RuntimeResolution>
170+
<Directory path="%HOMEDRIVE%\t\UnitTestProject5\UnitTestProject5\bin\Debug" includeSubDirectories="true" />
171+
</RuntimeResolution>
172+
</AssemblyResolution>
173+
</UnitTestRunConfig>
174+
</TestTypeSpecific>
175+
<AgentRule name="LocalMachineDefaultRole">
176+
</AgentRule>
177+
</Execution>
178+
<Properties />
179+
</TestSettings>
180+
""";
181+
182+
var testsettingsFile = Path.Combine(TempDirectory.Path, "tempsettings.testsettings");
183+
184+
File.WriteAllText(testsettingsFile, testSettingsXml, Encoding.UTF8);
185+
186+
var source = GetAssetFullPath("MstestV1UnitTestProject.dll");
187+
188+
InvokeVsTestForExecution(source, null, runnerInfo.TargetFramework, runSettings: testsettingsFile, null);
189+
190+
// Assert
191+
// Ensure that we are actually running via TPv0 provider.
192+
StringAssert.Contains(StdOutWithWhiteSpace, "The test execution was delegated to legacy TestPlatform runner");
193+
194+
ValidateSummaryStatus(2, 2, 1);
195+
ExitCodeEquals(1); // failing tests
196+
StdErrHasTestRunFailedMessageButNoOtherError();
197+
}
198+
133199
[TestMethod]
134200
[NetFullTargetFrameworkDataSource]
135201
[NetCoreTargetFrameworkDataSource]

0 commit comments

Comments
 (0)