Skip to content

Commit

Permalink
Cleanup workloads for testing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
safern committed Oct 19, 2021
1 parent 21bdf48 commit 90cbd05
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@
</ItemGroup>
</Target>

<Import Condition="'$(TestUsingWorkloads)' == 'true'" Project="$(MSBuildThisFileDirectory)workloads-testing.targets" />

<Target Name="PublishTestAsSelfContained"
Condition="'$(IsCrossTargetingBuild)' != 'true'"
AfterTargets="Build"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<Project>

<PropertyGroup>
<!-- for non-ci builds, we install the sdk when tests are run -->
<InstallWorkloadForTesting Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(ArchiveTests)' == 'true'">true</InstallWorkloadForTesting>
</PropertyGroup>

<Target Name="ProvisionSdkForWorkloadTesting"
DependsOnTargets="_ProvisionSdkWithNoWorkload"
Condition="!Exists($(SdkWithNoWorkloadStampPath)) or !Exists($(SdkWithWorkloadStampPath))">
Expand Down Expand Up @@ -88,8 +94,10 @@
</ItemGroup>

<PropertyGroup>
<_PackageVersion>$(PackageVersion)</_PackageVersion>
<_PackageVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</_PackageVersion>
<!-- Eg. Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm.6.0.0-dev.nupkg -->
<_AOTCrossNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.AOT.$(NETCoreSdkRuntimeIdentifier).Cross.$(RuntimeIdentifier).$(PackageVersion).nupkg</_AOTCrossNuGetPath>
<_AOTCrossNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.AOT.$(NETCoreSdkRuntimeIdentifier).Cross.$(RuntimeIdentifier).$(_PackageVersion).nupkg</_AOTCrossNuGetPath>
</PropertyGroup>

<Error Text="Could not find cross compiler nupkg at $(_AOTCrossNuGetPath). Found packages: @(_BuiltNuGets)"
Expand Down
7 changes: 0 additions & 7 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
<StrongNameKeyId Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true'">$(TestStrongNameKeyId)</StrongNameKeyId>
</PropertyGroup>

<PropertyGroup Condition="'$(TestUsingWorkloads)' == 'true'">
<!-- for non-ci builds, we install the sdk when tests are run -->
<InstallWorkloadForTesting Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(ArchiveTests)' == 'true'">true</InstallWorkloadForTesting>
</PropertyGroup>

<!-- resources.targets need to be imported before the Arcade SDK. -->
<Import Project="$(RepositoryEngineeringDir)resources.targets" />
<Import Project="..\..\Directory.Build.targets" />
Expand Down Expand Up @@ -272,6 +267,4 @@
<Error Condition="'%(_AnalyzerPackFile.TargetFramework)' != 'netstandard2.0'"
Text="Analyzers must only target netstandard2.0 since they run in the compiler which targets netstandard2.0. The following files were found to target '%(_AnalyzerPackFile.TargetFramework)': @(_AnalyzerPackFile)" />
</Target>

<Import Project="$(MSBuildThisFileDirectory)workloads-testing.targets" />
</Project>

0 comments on commit 90cbd05

Please sign in to comment.