Skip to content
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

[main] Update dependencies from dotnet/arcade, microsoft/testanywhere #4062

Merged
merged 10 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.24561.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.24564.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>32b8acf5b6f79e78a7cc5f7b7c619f68ff0c97ad</Sha>
<Sha>c1852b9ac37df9a86630c2f078dbee43f7b186e7</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="10.0.0-beta.24561.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="10.0.0-beta.24564.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>32b8acf5b6f79e78a7cc5f7b7c619f68ff0c97ad</Sha>
<Sha>c1852b9ac37df9a86630c2f078dbee43f7b186e7</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="10.0.0-beta.24561.1">
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="10.0.0-beta.24564.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>32b8acf5b6f79e78a7cc5f7b7c619f68ff0c97ad</Sha>
<Sha>c1852b9ac37df9a86630c2f078dbee43f7b186e7</Sha>
</Dependency>
<Dependency Name="Microsoft.Testing.Extensions.CodeCoverage" Version="17.13.0-preview.24561.3">
<Dependency Name="Microsoft.Testing.Extensions.CodeCoverage" Version="17.13.0-preview.24562.1">
<Uri>https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage</Uri>
<Sha>376a7aac0fdd0c9209dae38a7b809c261868e4ef</Sha>
<Sha>4f6e6afd41ccf30b0be2e0722fe4131106bf1b91</Sha>
</Dependency>
<Dependency Name="Microsoft.Testing.Internal.Framework" Version="1.5.0-preview.24561.1">
<Dependency Name="Microsoft.Testing.Internal.Framework" Version="1.5.0-preview.24566.1">
<Uri>https://github.com/microsoft/testanywhere</Uri>
<Sha>e9b108eb382f2d24ca546ca890098480d9685b8f</Sha>
<Sha>3618dd0008fac97fc6a64ef9b06453f5d731b55d</Sha>
</Dependency>
<Dependency Name="MSTest.Engine" Version="1.0.0-alpha.24473.2">
<Uri>https://github.com/microsoft/testanywhere</Uri>
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
</PropertyGroup>
<PropertyGroup Label="MSTest prod dependencies - darc updated">
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>10.0.0-beta.24561.1</MicrosoftDotNetBuildTasksTemplatingPackageVersion>
<MicrosoftTestingExtensionsCodeCoverageVersion>17.13.0-preview.24561.3</MicrosoftTestingExtensionsCodeCoverageVersion>
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>10.0.0-beta.24564.1</MicrosoftDotNetBuildTasksTemplatingPackageVersion>
<MicrosoftTestingExtensionsCodeCoverageVersion>17.13.0-preview.24562.1</MicrosoftTestingExtensionsCodeCoverageVersion>
<!-- comment to facilitate merge conflicts -->
<MicrosoftTestingInternalFrameworkVersion>1.5.0-preview.24561.1</MicrosoftTestingInternalFrameworkVersion>
<MicrosoftTestingInternalFrameworkVersion>1.5.0-preview.24566.1</MicrosoftTestingInternalFrameworkVersion>
<MSTestEngineVersion>1.0.0-alpha.24473.2</MSTestEngineVersion>
</PropertyGroup>
</Project>
5 changes: 3 additions & 2 deletions eng/common/core-templates/job/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ parameters:
# The name of the job. This is included in the job ID.
# targetRID: ''
# The name of the target RID to use, instead of the one auto-detected by Arcade.
# nonPortable: false
# portableBuild: false
# Enables non-portable mode. This means a more specific RID (e.g. fedora.32-x64 rather than
# linux-x64), and compiling against distro-provided packages rather than portable ones.
# linux-x64), and compiling against distro-provided packages rather than portable ones. The
# default is portable mode.
# skipPublishValidation: false
# Disables publishing validation. By default, a check is performed to ensure no packages are
# published by source-build.
Expand Down
7 changes: 6 additions & 1 deletion eng/common/core-templates/steps/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ steps:
assetManifestFileName=SourceBuild_${{ parameters.platform.name }}.xml
fi

portableBuildArgs=
if [ '${{ parameters.platform.portableBuild }}' != '' ]; then
portableBuildArgs='/p:PortabelBuild=${{ parameters.platform.portableBuild }}'
fi

${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \
--configuration $buildConfig \
--restore --build --pack $publishArgs -bl \
Expand All @@ -85,7 +90,7 @@ steps:
$targetRidArgs \
$runtimeOsArgs \
$baseOsArgs \
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \
$portableBuildArgs \
/p:DotNetBuildSourceOnly=true \
/p:DotNetBuildRepo=true \
/p:AssetManifestFileName=$assetManifestFileName
Expand Down
2 changes: 1 addition & 1 deletion eng/common/sdk-task.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ try {
$GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty
}
if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) {
$GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.10.0-pre.4.0" -MemberType NoteProperty
$GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.12.0" -MemberType NoteProperty
}
if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") {
$xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true
Expand Down
4 changes: 2 additions & 2 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =

# If the version of msbuild is going to be xcopied,
# use this version. Version matches a package here:
# https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.10.0-pre.4.0
$defaultXCopyMSBuildVersion = '17.10.0-pre.4.0'
# https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.12.0
$defaultXCopyMSBuildVersion = '17.12.0'

if (!$vsRequirements) {
if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {
Expand Down
6 changes: 3 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "9.0.100-rc.2.24474.11",
"dotnet": "9.0.100",
"runtimes": {
"dotnet": [
"3.1.32",
Expand All @@ -20,12 +20,12 @@
}
},
"sdk": {
"version": "9.0.100-rc.2.24474.11",
"version": "9.0.100",
"allowPrerelease": true,
"rollForward": "latestFeature"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24561.1",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24564.1",
"MSBuild.Sdk.Extras": "3.0.44"
}
}
25 changes: 10 additions & 15 deletions src/Adapter/MSTest.TestAdapter/Execution/TestAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ public class TestAssemblyInfo
{
private readonly object _assemblyInfoExecuteSyncObject;

private MethodInfo? _assemblyInitializeMethod;
private MethodInfo? _assemblyCleanupMethod;

/// <summary>
/// Initializes a new instance of the <see cref="TestAssemblyInfo"/> class.
/// </summary>
Expand All @@ -40,18 +37,17 @@ internal TestAssemblyInfo(Assembly assembly)
/// </summary>
public MethodInfo? AssemblyInitializeMethod
{
get => _assemblyInitializeMethod;

get;
internal set
{
if (_assemblyInitializeMethod != null)
if (field != null)
{
DebugEx.Assert(_assemblyInitializeMethod.DeclaringType?.FullName is not null, "AssemblyInitializeMethod.DeclaringType.FullName is null");
string message = string.Format(CultureInfo.CurrentCulture, Resource.UTA_ErrorMultiAssemblyInit, _assemblyInitializeMethod.DeclaringType.FullName);
DebugEx.Assert(field.DeclaringType?.FullName is not null, "AssemblyInitializeMethod.DeclaringType.FullName is null");
string message = string.Format(CultureInfo.CurrentCulture, Resource.UTA_ErrorMultiAssemblyInit, field.DeclaringType.FullName);
throw new TypeInspectionException(message);
}

_assemblyInitializeMethod = value;
field = value;
}
}

Expand All @@ -70,18 +66,17 @@ internal set
/// </summary>
public MethodInfo? AssemblyCleanupMethod
{
get => _assemblyCleanupMethod;

get;
internal set
{
if (_assemblyCleanupMethod != null)
if (field != null)
{
DebugEx.Assert(_assemblyCleanupMethod.DeclaringType?.FullName is not null, "AssemblyCleanupMethod.DeclaringType.FullName is null");
string message = string.Format(CultureInfo.CurrentCulture, Resource.UTA_ErrorMultiAssemblyClean, _assemblyCleanupMethod.DeclaringType.FullName);
DebugEx.Assert(field.DeclaringType?.FullName is not null, "AssemblyCleanupMethod.DeclaringType.FullName is null");
string message = string.Format(CultureInfo.CurrentCulture, Resource.UTA_ErrorMultiAssemblyClean, field.DeclaringType.FullName);
throw new TypeInspectionException(message);
}

_assemblyCleanupMethod = value;
field = value;
}
}

Expand Down
31 changes: 12 additions & 19 deletions src/Adapter/MSTest.TestAdapter/Execution/TestClassInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution;
public class TestClassInfo
{
private readonly object _testClassExecuteSyncObject = new();
private MethodInfo? _classCleanupMethod;
private MethodInfo? _classInitializeMethod;
private MethodInfo? _testCleanupMethod;
private MethodInfo? _testInitializeMethod;

/// <summary>
/// Initializes a new instance of the <see cref="TestClassInfo"/> class.
Expand Down Expand Up @@ -84,17 +80,16 @@ internal TestClassInfo(
/// </summary>
public MethodInfo? ClassInitializeMethod
{
get => _classInitializeMethod;

get;
internal set
{
if (_classInitializeMethod != null)
if (field != null)
{
string message = string.Format(CultureInfo.CurrentCulture, Resource.UTA_ErrorMultiClassInit, ClassType.FullName);
throw new TypeInspectionException(message);
}

_classInitializeMethod = value;
field = value;
}
}

Expand Down Expand Up @@ -157,17 +152,16 @@ internal set
/// </summary>
public MethodInfo? ClassCleanupMethod
{
get => _classCleanupMethod;

get;
internal set
{
if (_classCleanupMethod != null)
if (field != null)
{
string message = string.Format(CultureInfo.CurrentCulture, Resource.UTA_ErrorMultiClassClean, ClassType.FullName);
throw new TypeInspectionException(message);
}

_classCleanupMethod = value;
field = value;
}
}

Expand Down Expand Up @@ -200,17 +194,17 @@ public bool HasExecutableCleanupMethod
/// </summary>
public MethodInfo? TestInitializeMethod
{
get => _testInitializeMethod;
get;

internal set
{
if (_testInitializeMethod != null)
if (field != null)
{
string message = string.Format(CultureInfo.CurrentCulture, Resource.UTA_ErrorMultiInit, ClassType.FullName);
throw new TypeInspectionException(message);
}

_testInitializeMethod = value;
field = value;
}
}

Expand All @@ -219,17 +213,16 @@ internal set
/// </summary>
public MethodInfo? TestCleanupMethod
{
get => _testCleanupMethod;

get;
internal set
{
if (_testCleanupMethod != null)
if (field != null)
{
string message = string.Format(CultureInfo.CurrentCulture, Resource.UTA_ErrorMultiClean, ClassType.FullName);
throw new TypeInspectionException(message);
}

_testCleanupMethod = value;
field = value;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ public class TestRunCancellationToken
/// </summary>
private readonly ConcurrentBag<Action> _registeredCallbacks = new();

/// <summary>
/// Stores whether the test run is canceled or not.
/// </summary>
private bool _canceled;

public TestRunCancellationToken()
: this(CancellationToken.None)
{
Expand All @@ -35,12 +30,11 @@ public TestRunCancellationToken()
/// </summary>
public bool Canceled
{
get => _canceled;

get;
private set
{
bool previousValue = _canceled;
_canceled = value;
bool previousValue = field;
field = value;

if (!previousValue && value)
{
Expand Down
Loading
Loading