-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update sourcegen #3880
base: main
Are you sure you want to change the base?
Update sourcegen #3880
Changes from all commits
cc0d3be
990d154
0969391
45cb700
acec139
b21bf50
2b6ee6c
8294a2d
b546d0c
0f8c9cb
c4a2bb8
2520e34
0b651fa
91414af
e89c7d3
b0ead66
e298e0a
def4e8b
ad94d29
88ff2bc
9477851
873bd97
5e41dba
430bb08
31001ac
ce4198b
04f6470
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -21,9 +21,9 @@ | |||||
<Uri>https://github.com/microsoft/testanywhere</Uri> | ||||||
<Sha>d8fa8c790db1eb9f5eee1d4d8be1c8c21c3c3ef9</Sha> | ||||||
</Dependency> | ||||||
<Dependency Name="MSTest.Engine" Version="1.0.0-alpha.24473.2"> | ||||||
<Dependency Name="MSTest.SourceGeneration" Version="1.0.0-alpha.24555.1"> | ||||||
<Uri>https://github.com/microsoft/testanywhere</Uri> | ||||||
<Sha>aa2fcc8616d988b234bc1d218465b20c56d0b82f</Sha> | ||||||
<Sha>3c99c34d0f99de8dacfe909073722bd8ba45f2d8</Sha> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
</Dependency> | ||||||
</ToolsetDependencies> | ||||||
</Dependencies> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3,14 +3,14 @@ | |||||
<!-- MSTest version --> | ||||||
<VersionPrefix>3.7.0</VersionPrefix> | ||||||
Youssef1313 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
<!-- Testing Platform version --> | ||||||
<TestingPlatformVersionPrefix>1.5.0</TestingPlatformVersionPrefix> | ||||||
<TestingPlatformVersionPrefix>1.6.0</TestingPlatformVersionPrefix> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to be reset
Suggested change
|
||||||
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel> | ||||||
</PropertyGroup> | ||||||
<PropertyGroup Label="MSTest prod dependencies - darc updated"> | ||||||
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>10.0.0-beta.24570.1</MicrosoftDotNetBuildTasksTemplatingPackageVersion> | ||||||
<MicrosoftTestingExtensionsCodeCoverageVersion>17.13.0-preview.24562.1</MicrosoftTestingExtensionsCodeCoverageVersion> | ||||||
<!-- comment to facilitate merge conflicts --> | ||||||
<MicrosoftTestingInternalFrameworkVersion>1.5.0-preview.24569.1</MicrosoftTestingInternalFrameworkVersion> | ||||||
<MSTestEngineVersion>1.0.0-alpha.24473.2</MSTestEngineVersion> | ||||||
<MSTestSourceGenerationVersion>1.0.0-alpha.24555.1</MSTestSourceGenerationVersion> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Syncing versions
Suggested change
|
||||||
</PropertyGroup> | ||||||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ | |
using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution; | ||
using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Helpers; | ||
using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.ObjectModel; | ||
#if NET8_0_OR_GREATER | ||
using Microsoft.VisualStudio.TestPlatform.MSTestAdapter; | ||
#endif | ||
using Microsoft.VisualStudio.TestPlatform.ObjectModel; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting.Internal; | ||
|
@@ -305,8 +308,13 @@ private static bool DynamicDataAttached(UnitTestElement test, Lazy<TestMethodInf | |
TryProcessITestDataSourceTests(test, testMethodInfo.Value, tests); | ||
} | ||
|
||
[UnconditionalSuppressMessage("Aot", "IL3000:DoNotUseLocation", Justification = "Fixture tests are not supported in NativeAOT mode.")] | ||
|
||
private static void AddFixtureTests(TestMethodInfo testMethodInfo, List<UnitTestElement> tests, HashSet<string> fixtureTests) | ||
{ | ||
#if NET8_0_OR_GREATER | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could be |
||
ApplicationStateGuard.Ensure(System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported, "Fixture tests are not supported in NativeAOT mode."); | ||
#endif | ||
string assemblyName = testMethodInfo.Parent.Parent.Assembly.GetName().Name!; | ||
string assemblyLocation = testMethodInfo.Parent.Parent.Assembly.Location; | ||
string className = testMethodInfo.Parent.ClassType.Name; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,17 @@ namespace Microsoft.VisualStudio.TestTools.UnitTesting; | |
public static class TestingPlatformBuilderHook | ||
{ | ||
#pragma warning disable IDE0060 // Remove unused parameter | ||
public static void AddExtensions(ITestApplicationBuilder testApplicationBuilder, string[] arguments) => testApplicationBuilder.AddMSTest(() => [Assembly.GetEntryAssembly()!]); | ||
public static void AddExtensions(ITestApplicationBuilder testApplicationBuilder, string[] arguments) | ||
{ | ||
#if NET8_0_OR_GREATER | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC it did not build with just netcoreapp, and net7 is out of life and rest of the platform used net8 so I used net8 |
||
if (!System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported) | ||
{ | ||
// We don't have a reliable way to get reference to the entry dll when compiled as NativeAOT. So instead we do the same registration | ||
// in source generator. | ||
return; | ||
} | ||
#endif | ||
testApplicationBuilder.AddMSTest(() => [Assembly.GetEntryAssembly()!]); | ||
} | ||
} | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's sync versions: