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

Use new CoreDisTools package #44490

Merged
merged 7 commits into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from 5 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
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,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.20555.2</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.20555.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 Condition="'$(DotNetBuildFromSource)' != 'true'">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the whole file import instead be conditioned as the properties below won't work without the PackageReference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can move this condition to Import element in R2RDump.csproj.

Would I need the same condition for src/tests/Common/Directory.Build.targets ? As far as I understand, we don't build tests during source build, so the condition will always be true.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah please add it to both imports. You are right that we don't build these currently in source build we might at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ViktorHofer - I addressed both of your suggestions.

<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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Anipik TargetOS for Windows should be lowercase windows, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me follow up on this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I saw this in another place in your PR as well. It isn't causing a problem right now as msbuild is case insensitive but it should be cleaned up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed in #44845

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the reason to have Linux and OSX uppercased but not Windows?

<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 @@ -183,7 +183,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 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)coredistools.targets" />
<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)')">
echesakov marked this conversation as resolved.
Show resolved Hide resolved
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
12 changes: 12 additions & 0 deletions src/tests/Common/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

<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>
</PropertyGroup>

<Import Project="$(RepoRoot)eng/coredistools.targets" Condition="$(GCStressDependsOnCoreDisTools)" />
echesakov marked this conversation as resolved.
Show resolved Hide resolved

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

<ItemGroup>
<RunTimeDependencyCopyLocal Include="$(CoreDisToolsLibrary)" Condition="$(GCStressDependsOnCoreDisTools)" />
</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