Skip to content

Commit

Permalink
Use new CoreDisTools package (dotnet#44490)
Browse files Browse the repository at this point in the history
R2RDump and GCStress use a version of coredistools produced from https://github.com/dotnet/jitutils
  • Loading branch information
echesakov authored Nov 17, 2020
1 parent ed29578 commit 7d6b73e
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 444 deletions.
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
<RefOnlyNugetProjectModelVersion>4.9.4</RefOnlyNugetProjectModelVersion>
<RefOnlyNugetPackagingVersion>4.9.4</RefOnlyNugetPackagingVersion>
<!-- Testing -->
<MicrosoftNETCoreCoreDisToolsVersion>1.0.1-prerelease-00006</MicrosoftNETCoreCoreDisToolsVersion>
<MicrosoftNETTestSdkVersion>16.8.0-release-20201022-02</MicrosoftNETTestSdkVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>1.0.0-prerelease.20559.2</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.20559.2</MicrosoftDotNetXHarnessCLIVersion>
Expand Down
15 changes: 15 additions & 0 deletions eng/coredistools.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.CoreDisTools" Version="$(MicrosoftNETCoreCoreDisToolsVersion)">
<ExcludeAssets>native</ExcludeAssets>
<GeneratePathProperty>true</GeneratePathProperty>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<CoreDisToolsLibrary Condition="'$(TargetOS)' == 'Windows'">$(PkgMicrosoft_NETCore_CoreDisTools)\runtimes\win-$(TargetArchitecture)\native\coredistools.dll</CoreDisToolsLibrary>
<CoreDisToolsLibrary Condition="'$(TargetOS)' == 'Linux'">$(PkgMicrosoft_NETCore_CoreDisTools)\runtimes\linux-$(TargetArchitecture)\native\libcoredistools.so</CoreDisToolsLibrary>
<CoreDisToolsLibrary Condition="'$(TargetOS)' == 'OSX'">$(PkgMicrosoft_NETCore_CoreDisTools)\runtimes\osx-$(TargetArchitecture)\native\libcoredistools.dylib</CoreDisToolsLibrary>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ parameters:


steps:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:LibrariesConfiguration=${{ parameters.buildConfig }} -ci -skipstressdependencies -excludemonofailures os Android x64 $(buildConfigUpper)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:LibrariesConfiguration=${{ parameters.buildConfig }} -ci -excludemonofailures os Android x64 $(buildConfigUpper)
displayName: Build Tests

# Send tests to Helix
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/templates/runtimes/build-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
displayName: Disk Usage before Build
# Build managed test components
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) allTargets skipstressdependencies skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg)
displayName: Build managed test components

- ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/templates/runtimes/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ jobs:
# and directly unzip them there after download). Unfortunately the logic to copy
# the native artifacts to the final test folders is dependent on availability of the
# managed test artifacts.
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) skipstressdependencies copynativeonly $(crossgenArg) $(buildConfig) $(archType) $(priorityArg) $(librariesOverrideArg)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) copynativeonly $(crossgenArg) $(buildConfig) $(archType) $(priorityArg) $(librariesOverrideArg)
displayName: Copy native test components to test output folder


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ parameters:


steps:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:LibrariesConfiguration=${{ parameters.buildConfig }} -ci -skipstressdependencies -excludemonofailures os Browser wasm $(buildConfigUpper)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:LibrariesConfiguration=${{ parameters.buildConfig }} -ci -excludemonofailures os Browser wasm $(buildConfigUpper)
displayName: Build Tests

# Send tests to Helix
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/coreclr/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:

# Build native test components
- ${{ if ne(parameters.isOfficialBuild, true) }}:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) skipstressdependencies skipmanaged skipgeneratelayout $(buildConfig) $(archType) $(crossArg) $(osArg) $(priorityArg) $(compilerArg)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) skipmanaged skipgeneratelayout $(buildConfig) $(archType) $(crossArg) $(osArg) $(priorityArg) $(compilerArg)
displayName: Build native test components

# Sign and add entitlements to these MacOS binaries
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/runtimelab/runtimelab-post-build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
steps:
# Build coreclr native test output
- ${{ if eq(parameters.uploadRuntimeTests, true) }}:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) skipstressdependencies skipmanaged skipgeneratelayout $(buildConfigUpper) ${{ parameters.archType }}
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) skipmanaged skipgeneratelayout $(buildConfigUpper) ${{ parameters.archType }}
displayName: Build native test components

# Copy all build output into artifacts staging directory
Expand Down
7 changes: 4 additions & 3 deletions src/coreclr/src/tools/r2rdump/R2RDump.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
<OutputPath>$(RuntimeBinDir)/R2RDump</OutputPath>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)coredistools.targets" Condition="'$(DotNetBuildFromSource)' != 'true'" />
<Import Project="$(RepositoryEngineeringDir)DiaSymReaderNative.targets" />

<ItemGroup>
<PackageReference Include="Microsoft.NETCore.CoreDisTools">
<Version>1.0.1-prerelease-00005</Version>
</PackageReference>
<PackageReference Include="System.CommandLine">
<Version>$(SystemCommandLineVersion)</Version>
</PackageReference>
<ProjectReference Include="..\aot\ILCompiler.Reflection.ReadyToRun\ILCompiler.Reflection.ReadyToRun.csproj" />
<Content Include="$(CoreDisToolsLibrary)" Condition="Exists('$(CoreDisToolsLibrary)')">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
14 changes: 14 additions & 0 deletions src/tests/Common/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@

<Import Project="$(RepoRoot)eng/liveBuilds.targets" />

<PropertyGroup>
<GCStressDependsOnCoreDisTools>false</GCStressDependsOnCoreDisTools>
<GCStressDependsOnCoreDisTools Condition="'$(TargetOS)' == 'Windows' And ('$(TargetArchitecture)' == 'x64' Or '$(TargetArchitecture)' == 'x86')">true</GCStressDependsOnCoreDisTools>
<GCStressDependsOnCoreDisTools Condition="'$(TargetOS)' == 'Linux' And '$(TargetArchitecture)' == 'x64'">true</GCStressDependsOnCoreDisTools>
<CopyCoreDisToolsToCoreRoot>false</CopyCoreDisToolsToCoreRoot>
<CopyCoreDisToolsToCoreRoot Condition="$(GCStressDependsOnCoreDisTools) And '$(DotNetBuildFromSource)' != 'true'">true</CopyCoreDisToolsToCoreRoot>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)coredistools.targets" Condition="$(CopyCoreDisToolsToCoreRoot)" />

<ItemGroup>
<KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
<KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App" />
Expand Down Expand Up @@ -132,6 +142,10 @@
TargetDir="runtime-test/"/>
</ItemGroup>

<ItemGroup>
<RunTimeDependencyCopyLocal Include="$(CoreDisToolsLibrary)" Condition="$(CopyCoreDisToolsToCoreRoot)" />
</ItemGroup>

<Copy
SourceFiles="@(RunTimeDependencyCopyLocal)"
DestinationFiles="@(RunTimeDependencyCopyLocal -> '$(CORE_ROOT)/%(TargetDir)%(RecursiveDir)%(Filename)%(Extension)')"
Expand Down
124 changes: 0 additions & 124 deletions src/tests/Common/setup-stress-dependencies.cmd

This file was deleted.

Loading

0 comments on commit 7d6b73e

Please sign in to comment.