Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99827af

Browse files
[main] Remove netstandard-2.1 from installer tests (#2402)
Co-authored-by: Nikola Milosavljevic <[email protected]>
1 parent bc7decc commit 99827af

File tree

2 files changed

+6
-30
lines changed

2 files changed

+6
-30
lines changed

eng/pipelines/templates/stages/vmr-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ stages:
6666
jobs:
6767
- job: ValidateInstallers_Linux_x64
6868
pool: ${{ parameters.pool_Linux }}
69-
timeoutInMinutes: 30
69+
timeoutInMinutes: 60
7070
steps:
7171
- template: ../steps/vmr-validate-installers.yml
7272
parameters:

test/Microsoft.DotNet.Installer.Tests/LinuxInstallerTests.cs

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,12 @@ public partial class LinuxInstallerTests : IDisposable
5252
$"{DotnetRuntimePrefix}{Config.TargetFrameworkVersion}",
5353
$"{DotnetTargetingPackPrefix}{Config.TargetFrameworkVersion}",
5454
$"{DotnetApphostPackPrefix}{Config.TargetFrameworkVersion}",
55-
NetStandardTargetingPackName,
5655
$"{AspNetCoreRuntimePrefix}{Config.TargetFrameworkVersion}",
5756
$"{AspNetCoreTargetingPackPrefix}{Config.TargetFrameworkVersion}"
5857
}
5958
}
6059
};
6160

62-
private static readonly Uri NetStandard21RpmPackage = new Uri("https://dotnetcli.blob.core.windows.net/dotnet/Runtime/3.1.0/netstandard-targeting-pack-2.1.0-x64.rpm");
63-
private static readonly Uri NetStandard21DebPackage = new Uri("https://dotnetcli.blob.core.windows.net/dotnet/Runtime/3.1.0/netstandard-targeting-pack-2.1.0-x64.deb");
64-
6561
// Transform patch versions in 100-199 range by removing leading "1"
6662
// e.g., 10.0.100-rc.1.25405.108 -> 10.0.0-rc.1.25405.108
6763
// e.g., 10.0.112-rc.1.25405.108 -> 10.0.12-rc.1.25405.108
@@ -95,8 +91,6 @@ public partial class LinuxInstallerTests : IDisposable
9591
private const string AspNetCoreRuntimePrefix = "aspnetcore-runtime-";
9692
private const string AspNetCoreTargetingPackPrefix = "aspnetcore-targeting-pack-";
9793
private const string DotnetApphostPackPrefix = "dotnet-apphost-pack-";
98-
private const string NetStandardTargetingPackPrefix = "netstandard-targeting-pack-";
99-
private const string NetStandardTargetingPackName = $"{NetStandardTargetingPackPrefix}2.1";
10094
private const string DotnetSdkPrefix = "dotnet-sdk-";
10195

10296
public static bool IncludeRpmTests => Config.TestRpmPackages;
@@ -200,7 +194,7 @@ private async Task InitializeContextAsync(PackageType packageType, bool initiali
200194
File.Copy(rpmPackage, Path.Combine(_contextDir, Path.GetFileName(rpmPackage)));
201195
}
202196

203-
await DownloadPackagesAsync(packageArchitecture, packageType, NetStandard21RpmPackage);
197+
await DownloadPackagesAsync(packageArchitecture, packageType);
204198
_rpmContextInitialized = true;
205199
}
206200
else if (!_debContextInitialized)
@@ -211,7 +205,7 @@ private async Task InitializeContextAsync(PackageType packageType, bool initiali
211205
File.Copy(debPackage, Path.Combine(_contextDir, Path.GetFileName(debPackage)));
212206
}
213207

214-
await DownloadPackagesAsync(packageArchitecture, packageType, NetStandard21DebPackage);
208+
await DownloadPackagesAsync(packageArchitecture, packageType);
215209
_debContextInitialized = true;
216210
}
217211

@@ -246,16 +240,11 @@ private async Task InitializeContextAsync(PackageType packageType, bool initiali
246240
}
247241
}
248242

249-
private async Task DownloadPackagesAsync(string packageArchitecture, PackageType packageType, Uri netStandardPackageUri)
243+
private async Task DownloadPackagesAsync(string packageArchitecture, PackageType packageType)
250244
{
251245
// Collect URLs and file names for downloading
252246
var downloadsToProcess = new List<(Uri url, string fileName)>();
253247

254-
if (Config.Architecture == Architecture.X64)
255-
{
256-
downloadsToProcess.Add((netStandardPackageUri, netStandardPackageUri.Segments.Last()));
257-
}
258-
259248
// Since this is for a non-1xx branch, we never produced runtime packages. Download these from
260249
// the referenced 1xx build instead.
261250
if (!Config.DotNetBuildSharedComponents)
@@ -437,11 +426,6 @@ private List<string> GetPackageList(string baseImage, PackageType packageType)
437426
AddPackage(packageList, AspNetCoreRuntimePrefix, packageType);
438427
AddPackage(packageList, AspNetCoreTargetingPackPrefix, packageType);
439428
AddPackage(packageList, DotnetApphostPackPrefix, packageType);
440-
if (Config.Architecture == Architecture.X64)
441-
{
442-
// netstandard package exists for x64 only
443-
AddPackage(packageList, NetStandardTargetingPackPrefix, packageType);
444-
}
445429
AddPackage(packageList, DotnetSdkPrefix, packageType);
446430

447431
return packageList;
@@ -570,8 +554,8 @@ private void ValidatePackageDependencies(List<string> list, PackageType packageT
570554
{
571555
foreach (string package in list)
572556
{
573-
// Skip netstandard and runtime-deps packages as they are not expected to have .NET dependencies
574-
if (package.StartsWith(NetStandardTargetingPackPrefix) || package.StartsWith(DotnetRuntimeDepsPrefix))
557+
// Skip runtime-deps packages as they are not expected to have .NET dependencies
558+
if (package.StartsWith(DotnetRuntimeDepsPrefix))
575559
{
576560
continue;
577561
}
@@ -589,14 +573,6 @@ private void EnsurePackageContainsExpectedDependencies(string package, PackageTy
589573
? _expectedPackageDependencies[packagePrefix]
590574
: [];
591575

592-
if (Config.Architecture == Architecture.Arm64 && expectedDependencies.Contains(NetStandardTargetingPackName))
593-
{
594-
// If we're on Arm64, remove netstandard-targeting-pack-2.1 dependency, as it is x64 only
595-
expectedDependencies = expectedDependencies
596-
.Where(dep => !dep.StartsWith(NetStandardTargetingPackName))
597-
.ToList();
598-
}
599-
600576
Assert.Equal(expectedDependencies.OrderBy(x => x), dependencies.OrderBy(x => x));
601577
}
602578

0 commit comments

Comments
 (0)