Remove HarvestVersionValidation from pkg testing (#53818)
authorViktor Hofer <viktor.hofer@microsoft.com>
Mon, 7 Jun 2021 20:26:48 +0000 (22:26 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Jun 2021 20:26:48 +0000 (22:26 +0200)
* Remove HarvestVersionValidation from pkg testing

As packages assets aren't redistributed anymore, harvesting doesn't need to rely on exact versions and thus the task isn't necessary anymore.

src/libraries/pkg/test/testPackages.proj

index 872a3da..2e3823c 100644 (file)
@@ -8,9 +8,6 @@
   <ItemGroup>
     <PackagesToTest Condition="'$(PackagesToTest)' != ''" Include="$(PackagesToTest)" />
 
-    <PackageReports Condition="'@(PackagesToTest)' == ''" Include="$(PackageReportDir)*.json" Exclude="@(ExcludePackages->'$(PackageReportDir)%(Identity).json')"/>
-    <PackageReports Condition="'@(PackagesToTest)' != ''" Include="@(PackagesToTest->'$(PackageReportDir)%(Identity).json')" />
-
     <!-- support override via commandline -->
     <TargetFrameworksToInclude Condition="'$(TargetFrameworksToInclude)' != ''" Include="$(TargetFrameworksToInclude)" />
     <SymbolsPackages Include="$(LibrariesAllConfigShippingPackagesDir)*.symbols.nupkg" />
     <Exec Command="$(TestBuildCommand) &quot;$(TestProject)&quot;" EnvironmentVariables="@(CliEnvironment)" StandardOutputImportance="High" />
   </Target>
 
-  <UsingTask TaskName="ValidateHarvestVersionIsLatestForRelease" AssemblyFile="$(PackagingTaskDir)Microsoft.DotNet.Build.Tasks.Packaging.dll"/>
-  <Target Name="HarvestVersionValidation">
-    <!-- This target will validate that all packages that are harvesting assets will be doing it from the right package version.
-         If an error is detected, the task will print out the command needed in order to fix the problem. This test requires
-         network access, as what it does is ensure that the harvest version we are using is the latest stable available for that
-         specific package release. -->
-    <ValidateHarvestVersionIsLatestForRelease PackageReports="@(PackageReports)" />
-  </Target>
-
-  <Target Name="Build" DependsOnTargets="BuildProjects;HarvestVersionValidation;ArchiveHelixItems" />
+  <Target Name="Build" DependsOnTargets="BuildProjects;ArchiveHelixItems" />
 
   <!-- define test to do nothing, for this project Build does all the testing -->
   <Target Name="Test" />