Skip to content

Commit

Permalink
Clean up 2.0.0 BuildTools PR
Browse files Browse the repository at this point in the history
  • Loading branch information
wtgodbe committed May 19, 2017
1 parent 7a75598 commit 40151f7
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 92 deletions.
2 changes: 1 addition & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<Target Name="Sync" BeforeTargets="Build" />

<Target Name="RestoreNETCorePlatforms" AfterTargets="Build" Condition="'$(RestoreDuringBuild)'=='true'">
<Exec Command="$(DnuRestoreCommand) $(SourceDir).nuget/init/init.csproj"
<Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj"
StandardOutputImportance="Low" />
</Target>

Expand Down
28 changes: 0 additions & 28 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -90,34 +90,6 @@
<!-- Import Build tools common props file where repo-independent properties are found -->
<Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />


<!-- Common nuget properties -->
<PropertyGroup>
<NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(PackagesDir)NuGet.exe</NuGetToolPath>
<NuGetConfigFile Condition="'$(NuGetConfigFile)'==''">$(SourceDir)NuGet.Config</NuGetConfigFile>
<NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>

<NugetRestoreCommand>"$(NuGetToolPath)"</NugetRestoreCommand>
<NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
<!-- Trim off the last slash so that nuget doesn't get confused and say there are illegal characters on
the path. -->
<NugetRestoreCommand Condition="'$(OsEnvironment)'=='Windows_NT'">$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('\\'))"</NugetRestoreCommand>
<NugetRestoreCommand Condition="'$(OsEnvironment)'!='Windows_NT'">$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('\'))"</NugetRestoreCommand>
<NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
<NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
<NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
</PropertyGroup>

<PropertyGroup>
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>

<DnuRestoreCommand>"$(DotnetToolCommand)"</DnuRestoreCommand>
<DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
<DnuRestoreCommand Condition="'$(OsEnvironment)'=='Windows_NT'">$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand>
<DnuRestoreCommand Condition="'$(OsEnvironment)'!='Windows_NT'">$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\'))"</DnuRestoreCommand>
</PropertyGroup>

<!-- Setup common target properties that we use to conditionally include sources -->
<PropertyGroup>
<TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
Expand Down
10 changes: 5 additions & 5 deletions init-tools.msbuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)Tools/$(BuildToolsPackageVersion)</BaseIntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.BuildTools">
<Version>$(BuildToolsPackageVersion)</Version>
</PackageReference>
<Version>$(BuildToolsPackageVersion)</Version>
</PackageReference>
<PackageReference Include="Microsoft.DotNet.BuildTools.Coreclr">
<Version>1.0.4-prerelease</Version>
</PackageReference>
<Version>1.0.4-prerelease</Version>
</PackageReference>
</ItemGroup>
</Project>
26 changes: 11 additions & 15 deletions tests/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,18 @@
</PropertyGroup>

<ItemGroup>
<RestoreProjects Include="$(MSBuildThisFileDirectory)\scripts\scripts.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)\src\Common\build_against_pkg_dependencies\build_against_pkg_dependencies.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)\src\Common\targeting_pack_ref\targeting_pack_ref.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)\src\Common\test_dependencies\test_dependencies.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)\src\Common\test_runtime\test_runtime.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)\src\JIT\config\benchmark+roslyn\benchmark+roslyn.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)\src\JIT\config\benchmark+serialize\benchmark+serialize.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)\src\JIT\config\benchmark\benchmark.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)\src\performance\performance.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)\src\TestWrappersConfig\TestWrappersConfig.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)scripts\scripts.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\build_against_pkg_dependencies\build_against_pkg_dependencies.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\targeting_pack_ref\targeting_pack_ref.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\test_dependencies\test_dependencies.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\test_runtime\test_runtime.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\JIT\config\benchmark+roslyn\benchmark+roslyn.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\JIT\config\benchmark+serialize\benchmark+serialize.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\JIT\config\benchmark\benchmark.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\performance\performance.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\TestWrappersConfig\TestWrappersConfig.csproj" />
</ItemGroup>

<PropertyGroup>
<DnuRestoreDirs>@(RestoreProjects -> '%(Identity)', ' ')</DnuRestoreDirs>
</PropertyGroup>

<Target Name="BuildTargetingPack" AfterTargets="BatchRestorePackages">
<Message Text="Building Targeting Pack" Importance="High" />
<MSBuild Projects="$(MSBuildThisFileDirectory)\src\Common\external\external.depproj" />
Expand All @@ -54,7 +50,7 @@
</Target>

<Target Name="RestorePackage">
<Exec Command="$(DnuRestoreCommand) $(RestoreProj)"
<Exec Command="$(DotnetRestoreCommand) $(RestoreProj)"
StandardOutputImportance="Low" />
</Target>

Expand Down
43 changes: 5 additions & 38 deletions tests/dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -59,56 +59,23 @@
<TargetingPackPath Condition="'$(BaseTargetingPackPath)' == ''">$(RootBinDir)TargetingPack\</TargetingPackPath>
</PropertyGroup>

<Import Condition="Exists('$(ToolsDir)BuildVersion.targets')" Project="$(ToolsDir)BuildVersion.targets" />
<!-- Import Build tools common props file where repo-independent properties are found -->
<Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />

<!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
<Import Project="$(ProjectDir)..\dependencies.props" />

<!-- Common nuget properties -->
<PropertyGroup>
<NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(PackagesDir)NuGet.exe</NuGetToolPath>
<NuGetConfigFile Condition="'$(NuGetConfigFile)'==''">$(SourceDir)NuGet.Config</NuGetConfigFile>
<NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>

<NugetRestoreCommand>"$(NuGetToolPath)"</NugetRestoreCommand>
<NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
<!-- Trim off the last slash so that nuget doesn't get confused and say there are illegal characters on
the path. -->
<NugetRestoreCommand>$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('\\'))"</NugetRestoreCommand>
<NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
<NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
<NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
</PropertyGroup>

<!-- list of nuget package sources passed to dnu -->
<ItemGroup>
<!-- Need to escape double forward slash (%2F) or MSBuild will normalize to one slash on Unix. -->
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<DnuSourceList Include="https:%2F%2Fapi.nuget.org/v3/index.json" />
<DotnetSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
<DotnetSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<DotnetSourceList Include="https:%2F%2Fapi.nuget.org/v3/index.json" />
</ItemGroup>


<!-- list of directories to perform batch restore -->
<ItemGroup>
<DnuRestoreDir Include="&quot;$(MSBuildProjectDirectory)\**\*.csproj&quot;" />
</ItemGroup>

<PropertyGroup Condition="'$(BuildAllProjects)'=='true'">
<!-- When we do a traversal build we get all packages up front, don't restore them again -->
<RestorePackages>false</RestorePackages>
</PropertyGroup>

<PropertyGroup>
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>

<DnuRestoreSource>@(DnuSourceList -> '--source %(Identity)', ' ')</DnuRestoreSource>

<DnuRestoreCommand>"$(DotnetToolCommand)"</DnuRestoreCommand>
<DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
<DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('/\'.ToCharArray()))" $(DnuRestoreSource)</DnuRestoreCommand>
</PropertyGroup>

<!-- Which tests shall we build? Default: Priority 0 tests.
At the command-line, the user can specify /p:CLRTestPriorityToBuild=666 (for example), and
Expand Down
6 changes: 1 addition & 5 deletions tests/helixperftasks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,8 @@
<Output TaskParameter="PerfTestAssemblies" ItemName="CoreCLRPerfTest" />
</GetPerfTestAssemblies>

<ItemGroup>
<DnuSourceList Include="$(CORE_ROOT)\.nuget\pkg" />
</ItemGroup>

<!-- Restore the runtime dependencies -->
<Exec Command="$(DnuRestoreCommand) &quot;$(TestRuntimeProjectJson)&quot;"
<Exec Command="$(DotnetRestoreCommand) &quot;$(TestRuntimeProjectJson)&quot;"
StandardOutputImportance="Low"
CustomErrorRegularExpression="^Unable to resolve .*"
IgnoreExitCode="true"
Expand Down
1 change: 1 addition & 0 deletions tests/scripts/scripts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<ContainsPackageReferences>true</ContainsPackageReferences>
<PrereleaseResolveNuGetPackages>false</PrereleaseResolveNuGetPackages>
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\src\dir.targets" />
<Target Name="Build"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<CLRTestKind>BuildOnly</CLRTestKind>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.ILAsm">
Expand Down
1 change: 1 addition & 0 deletions tests/src/Common/external/external.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<XUnitRunnerPackageId Condition="'$(TargetGroup)' != 'netfx'">xunit.console.netcore</XUnitRunnerPackageId>
<XUnitRunnerPackageId Condition="'$(TargetGroup)' == 'netfx'">xunit.runner.console</XUnitRunnerPackageId>
<CLRTestKind>SharedLibrary</CLRTestKind>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Compilers">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<CLRTestKind>BuildOnly</CLRTestKind>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.TargetingPack.Private.CoreCLR">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<CLRTestKind>BuildOnly</CLRTestKind>
<NugetTargetMoniker>.NETCoreApp,Version=v2.0</NugetTargetMoniker>
<NugetTargetMonikerShort>netcoreapp2.0</NugetTargetMonikerShort>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.CoreDisTools">
Expand Down
1 change: 1 addition & 0 deletions tests/src/Common/test_runtime/test_runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<CLRTestKind>BuildOnly</CLRTestKind>
<NugetTargetMoniker>.NETCoreApp,Version=v2.0</NugetTargetMoniker>
<NugetTargetMonikerShort>netcoreapp2.0</NugetTargetMonikerShort>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.Platforms">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<PropertyGroup>
<NugetTargetMoniker>.NETStandard,Version=v1.4</NugetTargetMoniker>
<NugetTargetMonikerShort>netstandard1.4</NugetTargetMonikerShort>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Compilers">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<PropertyGroup>
<NugetTargetMoniker>.NETStandard,Version=v1.4</NugetTargetMoniker>
<NugetTargetMonikerShort>netstandard1.4</NugetTargetMonikerShort>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit.performance.api">
Expand Down
1 change: 1 addition & 0 deletions tests/src/JIT/config/benchmark/benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<PropertyGroup>
<NugetTargetMoniker>.NETStandard,Version=v1.4</NugetTargetMoniker>
<NugetTargetMonikerShort>netstandard1.4</NugetTargetMonikerShort>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit.performance.api">
Expand Down
1 change: 1 addition & 0 deletions tests/src/TestWrappersConfig/TestWrappersConfig.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<CLRTestKind>BuildOnly</CLRTestKind>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.Platforms">
Expand Down
1 change: 1 addition & 0 deletions tests/src/performance/performance.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<PropertyGroup>
<NugetTargetMoniker>.NETStandard,Version=v1.5</NugetTargetMoniker>
<NugetTargetMonikerShort>netstandard1.5</NugetTargetMonikerShort>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit.performance.api">
Expand Down

0 comments on commit 40151f7

Please sign in to comment.