Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Consume CoreFxTesting arcade package and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer committed Dec 4, 2018
1 parent 1ffab72 commit abba1ea
Show file tree
Hide file tree
Showing 25 changed files with 44 additions and 51 deletions.
30 changes: 7 additions & 23 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,14 @@
<ProjectAssetsFile Condition="'$(ProjectAssetsFile)' == 'unused'"></ProjectAssetsFile>
</PropertyGroup>

<Import Project="C:\git\arcade\src\Microsoft.DotNet.CoreFxTesting\build\Microsoft.DotNet.CoreFxTesting.props" />

<!-- Common repo directories -->
<PropertyGroup>
<!-- Properties to remove with buildtools removal -->
<ProjectDir>$(RepoRoot)</ProjectDir>
<BinDir>$(ProjectDir)artifacts\bin\</BinDir>

<SourceDir>$(ProjectDir)src\</SourceDir>

<!-- CoreFx sepcific paths -->
<GlobalToolsDir>$(ProjectDir)artifacts/tools/</GlobalToolsDir>
<TestWorkingDir Condition="'$(TestWorkingDir)'==''">$(BinDir)tests/</TestWorkingDir>
<!-- Use msbuild path functions as that property is used in bash scripts. -->
<SourceDir>$([MSBuild]::NormalizeDirectory('$(ProjectDir)', 'src'))</SourceDir>

<!-- Input Directories -->
<PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir>
Expand Down Expand Up @@ -111,7 +106,7 @@

<!-- Enable the analyzers for this repo -->
<PropertyGroup>
<EnableAnalyzers Condition="'$(EnableAnalyzers)'=='' AND '$(IsSourceProject)' == 'true'">true</EnableAnalyzers>
<EnableAnalyzers Condition="'$(EnableAnalyzers)' == '' AND '$(IsSourceProject)' == 'true'">true</EnableAnalyzers>
</PropertyGroup>

<!-- Default properties for CI builds -->
Expand All @@ -122,7 +117,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(OfficialBuildId)' == ''">
<!-- Disable F5 and test explorer support for CI builds. -->
<GenerateLaunchSettings>false</GenerateLaunchSettings>
<EnableLaunchSettings>false</EnableLaunchSettings>
<EnableVSTestReferences>false</EnableVSTestReferences>
</PropertyGroup>

Expand Down Expand Up @@ -264,21 +259,8 @@
<DisableArcadeTestFramework>true</DisableArcadeTestFramework>
</PropertyGroup>

<!-- TODO: Remove with Arcade update. -->
<PropertyGroup>
<_IsTestProjectBefore>$(IsTestProject)</_IsTestProjectBefore>
<_IsPerformanceTestProjectBefore>$(IsPerformanceTestProject)</_IsPerformanceTestProjectBefore>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<!-- Need to reset our definition of IsTestProject after arcade sdk import -->
<!-- TODO: Remove with Arcade update. -->
<PropertyGroup>
<IsTestProject>$(_IsTestProjectBefore)</IsTestProject>
<IsPerformanceTestProject>$(_IsPerformanceTestProjectBefore)</IsPerformanceTestProject>
</PropertyGroup>

<!-- Set the kind of PDB to Portable and turn on SourceLink (fetching source from GitHub) -->
<PropertyGroup>
<!-- Always pass portable to override arcade sdk which uses embedded for local builds -->
Expand Down Expand Up @@ -363,6 +345,7 @@

<RuntimePath Condition="'$(RuntimePath)' == ''">$(BinDir)runtime/$(BuildConfiguration)/</RuntimePath>
<ShimsTargetRuntimeRoot>$(BinDir)shimsTargetRuntime/</ShimsTargetRuntimeRoot>
<TestWorkingDir Condition="'$(TestWorkingDir)'==''">$(ArtifactsBinDir)tests/</TestWorkingDir>
<TestPath Condition="'$(TestPath)' == ''">$(TestWorkingDir)$(MSBuildProjectName)/$(BuildConfiguration)/</TestPath>
<RefRootPath>$(BinDir)ref/</RefRootPath>
<BuildConfigurationRefPath>$(RefRootPath)$(_bc_TargetGroup)/</BuildConfigurationRefPath>
Expand All @@ -372,8 +355,9 @@
<NetStandardRefPath>$(RefRootPath)netstandard/</NetStandardRefPath>
<NetFxRefPath>$(RefRootPath)netfx/</NetFxRefPath>
<TestArchiveRoot>$(ProjectDir)artifacts/helix/</TestArchiveRoot>
<TestArchiveTestsDir>$(TestArchiveRoot)tests/</TestArchiveTestsDir>
<TestArchiveTestsDir>$(TestArchiveRoot)tests/$(BuildConfiguration)/</TestArchiveTestsDir>
<TestArchiveRuntimeDir>$(TestArchiveRoot)runtime/$(BuildConfiguration)/</TestArchiveRuntimeDir>
<GlobalToolsDir>$(ArtifactsDir)tools/</GlobalToolsDir>

<!-- project file to use when resolving ReferenceFromRuntime items -->
<RuntimeProjectFile Condition="'$(RuntimeProjectFile)' == ''">$(ProjectDir)\external\runtime\runtime.depproj</RuntimeProjectFile>
Expand Down
2 changes: 0 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@

<Import Project="$(ToolSetCommonDirectory)Tools.proj.nuget.g.targets" Condition="Exists('$(ToolSetCommonDirectory)Tools.proj.nuget.g.targets')" />

<Import Project="C:\git\arcade\src\Microsoft.DotNet.CoreFxTesting\build\Microsoft.DotNet.CoreFxTesting.targets" />

<!-- permit a wrapping build system to contribute targets to this build -->
<Import Condition="Exists('$(MSBuildThisFileDirectory)..\open.targets')" Project="$(MSBuildThisFileDirectory)..\open.targets" />

Expand Down
2 changes: 1 addition & 1 deletion Documentation/building/code-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Our default, somewhat-arbitrary initial goal for a library is 90% code coverage.

Issues are opened for a library when a cursory examination of its code coverage reveal that there are likely still some meaningful gaps that need to be addressed. We welcome contributions to our test suites to help address these gaps and close these issues. Many of these issues are marked as [up-for-grabs](https://github.com/dotnet/corefx/labels/up-for-grabs).

An issue need not be addressed in its entirety. We happily accept contributions that improve our tests and work towards improving code coverage numbers even if they only incrementally improve the situation.
An issue need not be addressed in its entirety. We happily accept contributions that improve our tests and work towards improving code coverage numbers even if they only incrementally improve the situation.

## Automated Code Coverage Runs

Expand Down
1 change: 1 addition & 0 deletions eng/Tools.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<PackageReference Include="Microsoft.DotNet.GenAPI" Version="$(MicrosoftDotNetGenApiPackageVersion)" />
<PackageReference Include="Microsoft.DotNet.GenFacades" Version="$(MicrosoftDotNetGenFacadesPackageVersion)" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingPackageVersion)" />
<PackageReference Include="Microsoft.DotNet.CoreFxTesting" Version="$(MicrosoftDotNetCoreFxTestingPackageVersion)" />

<!-- Include the SourceLink packages -->
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
Expand Down
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
<MicrosoftDotNetGenFacadesPackageVersion>1.0.0-beta.18578.2</MicrosoftDotNetGenFacadesPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>2.4.0-beta.18578.2</MicrosoftDotNetXUnitExtensionsPackageVersion>
<MicrosoftDotNetBuildTasksPackagingPackageVersion>1.0.0-beta.18578.2</MicrosoftDotNetBuildTasksPackagingPackageVersion>
<MicrosoftDotNetCoreFxTestingPackageVersion>1.0.0-beta.18603.8</MicrosoftDotNetCoreFxTestingPackageVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion eng/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<RuntimeNativeSystemDataSqlClientSniPackageVersion>4.4.0</RuntimeNativeSystemDataSqlClientSniPackageVersion>

<!-- xunit test dependency version -->
<MicrosoftNetTestSdkPackageVersion>15.8.0</MicrosoftNetTestSdkPackageVersion>
<MicrosoftNetTestSdkPackageVersion>16.0.0-preview-20181128-01</MicrosoftNetTestSdkPackageVersion>
<XUnitPackageVersion>2.4.1-pre.build.4059</XUnitPackageVersion>
<XUnitPerformancePackageVersion>1.0.0-beta-build0020</XUnitPerformancePackageVersion>
<TraceEventPackageVersion>2.0.5</TraceEventPackageVersion>
Expand Down
11 changes: 9 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,21 @@
<AssemblySearchPaths>$(AssemblySearchPaths);$(RefPath);{RawFileName}</AssemblySearchPaths>
</PropertyGroup>

<!-- Use msbuild path functions as that property is used in bash scripts. -->
<ItemGroup>
<CoverageExcludeFile Include="$(SourceDir)Common/src/System/SR.*" />
<CoverageExcludeFile Include="$(SourceDir)Common/src/System/NotImplemented.cs" />
<CoverageExcludeFile Include="$([MSBuild]::NormalizePath('$(SourceDir)', 'Common', 'src', 'System', 'SR.*'))" />
<CoverageExcludeFile Include="$([MSBuild]::NormalizePath('$(SourceDir)', 'Common', 'src', 'System', 'NotImplemented.cs'))" />
</ItemGroup>

<ItemGroup>
<!-- Use IL version of System.Private.CoreLib and link to the testhost folder to probe additional assemblies. -->
<CoverageProbePath Include="shared\Microsoft.NETCore.App\9.9.9\il" />
<CoverageProbePath Include="shared\Microsoft.NETCore.App\9.9.9" />
</ItemGroup>

<!-- Transform CI paths in System.Private.CoreLib.pdb with local path for shared CoreLib files. -->
<PropertyGroup>
<CoverageTransformSource>fullPath=&quot;&quot;.*System\.Private\.CoreLib\\shared</CoverageTransformSource>
<CoverageTransformDestination>fullPath=&quot;&quot;&quot;&quot;$(CommonPath)\CoreLib</CoverageTransformDestination>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
<TargetingPackExclusions Include="System.Collections.Immutable" />
<DefaultReferenceExclusions Include="System.Collections.Immutable" />
<ReferenceFromRuntime Include="System.Collections.Immutable" />
<Compile Include="ImmutableListTestBase.cs" />
<Compile Include="ImmutableListTest.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
<TargetingPackExclusions Include="System.ComponentModel.Composition.Registration" />
<DefaultReferenceExclusions Include="System.ComponentModel.Composition.Registration" />
<ReferenceFromRuntime Include="System.ComponentModel.Composition.Registration" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
<TargetingPackExclusions Include="System.ComponentModel.Composition" />
<DefaultReferenceExclusions Include="System.ComponentModel.Composition" />
<ReferenceFromRuntime Include="System.ComponentModel.Composition" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ namespace System.ComponentModel.Tests
{
public class AddingNewEventArgsTests
{
[Fact]
public void C()
{
var x = TypeDescriptor.GetConverter(typeof(Nullable<Boolean>));
}

[Fact]
public void Ctor_Default()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<TargetingPackExclusions Include="System.Diagnostics.Debug" />
<DefaultReferenceExclusions Include="System.Diagnostics.Debug" />
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<ReferenceFromRuntime Include="System.Runtime" />
<ReferenceFromRuntime Include="System.Threading" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
<TargetingPackExclusions Include="System.IO.Pipelines" />
<DefaultReferenceExclusions Include="System.IO.Pipelines" />
<ReferenceFromRuntime Include="System.IO.Pipelines" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<IncludeDefaultReferences>false</IncludeDefaultReferences>
</PropertyGroup>
<ItemGroup>
<TargetingPackExclusions Include="System.Linq.Expressions" />
<DefaultReferenceExclusions Include="System.Linq.Expressions" />
<ReferenceFromRuntime Include="System.Linq.Expressions" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Configurations>netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<TargetingPackExclusions Include="System.Net.Http.WinHttpHandler" />
<DefaultReferenceExclusions Include="System.Net.Http.WinHttpHandler" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' ">
<Compile Include="$(CommonTestPath)\System\Net\SslProtocolSupport.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</PropertyGroup>
<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<ItemGroup>
<TargetingPackExclusions Include="System.Net.Http" />
<TargetingPackExclusions Include="System.Net.Mail" />
<DefaultReferenceExclusions Include="System.Net.Http" />
<DefaultReferenceExclusions Include="System.Net.Mail" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(CommonPath)\System\NotImplemented.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</ItemGroup>
<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<ItemGroup>
<TargetingPackExclusions Include="System.Net.Mail" />
<DefaultReferenceExclusions Include="System.Net.Mail" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\src\System\Net\Base64Stream.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>
<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<ItemGroup>
<TargetingPackExclusions Include="System.Net.NameResolution" />
<DefaultReferenceExclusions Include="System.Net.NameResolution" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<Compile Include="..\..\src\System\Net\IPHostEntry.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>
<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<ItemGroup>
<TargetingPackExclusions Include="System.Net.NameResolution" />
<DefaultReferenceExclusions Include="System.Net.NameResolution" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\src\System\Net\IPHostEntry.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>
<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<ItemGroup>
<TargetingPackExclusions Include="System.Net.Primitives" />
<DefaultReferenceExclusions Include="System.Net.Primitives" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\src\System\Net\Sockets\AddressFamily.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</PropertyGroup>
<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<ItemGroup>
<TargetingPackExclusions Include="System.Net.Primitives" />
<DefaultReferenceExclusions Include="System.Net.Primitives" />
</ItemGroup>
<ItemGroup>
<Compile Include="CookieInternalTest.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>
<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<ItemGroup>
<TargetingPackExclusions Include="System.Configuration" />
<DefaultReferenceExclusions Include="System.Configuration" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Net\Capability.Security.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</ItemGroup>
<ItemGroup>
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
<TargetingPackExclusions Include="System.Numerics.Tensors" />
<DefaultReferenceExclusions Include="System.Numerics.Tensors" />
<ReferenceFromRuntime Include="System.Numerics.Tensors" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
</ItemGroup>
<ItemGroup>
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
<TargetingPackExclusions Include="System.Reflection.Metadata" />
<DefaultReferenceExclusions Include="System.Reflection.Metadata" />
<ReferenceFromRuntime Include="System.Reflection.Metadata" />
</ItemGroup>
</Project>
6 changes: 1 addition & 5 deletions src/tests.builds
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<EnableFullCoverageReportTarget>true</EnableFullCoverageReportTarget>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />

<PropertyGroup>
<!-- When building through build-tests.cmd tests.builds is the main project that is being built. We set IsTestProject to true when the project path has /tests/.
Since IsTestProject is set to false in this case, when TargetGroup = netfx it will add net462 and net47 build configurations if they exist on the test project.
We only want to build tests against current TargetGroup -->
<AdditionalBuildConfigurations Condition="'$(TargetGroup)' == 'netfx'"></AdditionalBuildConfigurations>

<GenerateFullCoverageReport>true</GenerateFullCoverageReport>
<CoverageReportInputPath>$(TestWorkingDir)**/coverage.xml</CoverageReportInputPath>
<CoverageReportDir>$(ArtifactsDir)coverage</CoverageReportDir>
<EnableFullCoverageReportTarget>true</EnableFullCoverageReportTarget>
<EnableBenchviewTarget>true</EnableBenchviewTarget>
</PropertyGroup>

Expand Down

0 comments on commit abba1ea

Please sign in to comment.