Merge branch 'release/3.0' into merge/master-to-release/3.0
[platform/upstream/coreclr.git] / tests / dir.props
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   <Import Project="dir.sdkbuild.props" Condition="'$(UsingMicrosoftNETSdk)' == 'true'"  />
4
5   <PropertyGroup>
6     <LangVersion>8.0</LangVersion>
7     <UseSharedCompilation>true</UseSharedCompilation>
8   </PropertyGroup>
9
10     <!--
11      Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
12      as well as running the build on mono. Until we can get these sorted out we will continue using the .NET 4.5 version of the tasks.
13      
14      It also breaks building any C# project with dotnet.exe on Windows. The windows version of BuildTools doesn't appear to download the .NET Core
15      Roslyn NuGet package which has a Csc task supporting OverrideToolHost, but the default BuildTools CSharpCore targets file does specify 
16      OverrideToolHost. The result is that building anything in C# when RunningOnCore=true on Windows fails in Csc task with a parameter not supported error.
17      
18      Given that the Windows Core scenario is pretty broken on BuildTools it is currently configured not to use BuildTools at all. This allows ad-hoc usage
19      of the dotnet tool to work in the test tree as a developer convenience. Its not clear that we should invest in improving BuildTools Core support and
20      instead we could just move to using dotnet officially.
21      -->  
22   <PropertyGroup>  
23     <RunningOnCore>false</RunningOnCore>
24     <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'core'">true</RunningOnCore>
25     <BuildToolsTargetsDesktop>false</BuildToolsTargetsDesktop>
26     <BuildToolsTargetsDesktop Condition="'$(RunningOnCore)' != 'true'">true</BuildToolsTargetsDesktop>
27     <BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
28     <RunningOnUnix Condition="('$(RunningOnUnix)' == '') And ('$(MSBuildRuntimeType)' == 'Core') And ('$(OS)'!='Windows_NT')">true</RunningOnUnix>
29     <UseBuildTools>true</UseBuildTools>
30   </PropertyGroup>  
31
32   <!-- Common repo directories -->
33   <PropertyGroup>
34     <CopyNuGetImplementations Condition="'$(CopyNuGetImplementations)'==''">false</CopyNuGetImplementations>
35     <ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
36     <SourceDir>$(ProjectDir)src\</SourceDir>
37     <PackagesDir>$(ProjectDir)..\.packages\</PackagesDir>
38     <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)..\Tools\</ToolsDir>
39     <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ProjectDir)..\.dotnet\</DotnetCliPath>
40     <BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net46\</BuildToolsTaskDir>
41     <OverrideToolHost Condition="'$(OS)' != 'Windows_NT'">$(DotnetCliPath)dotnet</OverrideToolHost>
42     <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
43          the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
44     <_TargetFrameworkDirectories Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
45     <_FullFrameworkReferenceAssemblyPaths Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
46     <ExcludeSigningImport>true</ExcludeSigningImport>
47   </PropertyGroup>
48
49   <!-- Common properties -->
50   <PropertyGroup>
51     <RootBinDir>$(__RootBinDir)\</RootBinDir>
52     <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)..\bin\</RootBinDir>
53
54     <BinDir>$(__BinDir)\</BinDir>
55     <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
56
57     <AltJitArch>$(__AltJitArch)</AltJitArch>
58   </PropertyGroup>
59
60 <!-- Default Test platform to deploy the netstandard compiled tests to -->
61   <PropertyGroup>
62     <!-- we default TestTFM and FilterToTestTFM to netcoreapp1.0 if they are not explicity defined -->
63     <DefaultTestTFM Condition="'$(DefaultTestTFM)'==''">netcoreapp1.0</DefaultTestTFM>
64     <TestTFM Condition="'$(TestTFM)'==''">$(DefaultTestTFM)</TestTFM>
65     <FilterToTestTFM Condition="'$(FilterToTestTFM)'==''">$(DefaultTestTFM)</FilterToTestTFM>
66   </PropertyGroup>
67
68   <!-- Output paths -->
69   <PropertyGroup>
70     <!-- When not using the SKD, we want to set this property here so
71          that BuildVersionFile gets the correct value. -->
72     <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == '' Or '$(UsingMicrosoftNETSdk)' != 'true'">$(RootBinDir)obj\</BaseIntermediateOutputPath>
73     <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</IntermediateOutputPath>
74     <OutputPath Condition="'$(OutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</OutputPath>
75   </PropertyGroup>
76
77     <!-- Targeting Package paths -->
78   <PropertyGroup>
79     <TargetingPackPath Condition="'$(BaseTargetingPackPath)' == ''">$(RootBinDir)TargetingPack\</TargetingPackPath>
80   </PropertyGroup>
81
82   <!-- Import Build tools common props file where repo-independent properties are found -->
83   <Import Condition="Exists('$(ToolsDir)Build.Common.props') And '$(UseBuildTools)'=='true'" Project="$(ToolsDir)Build.Common.props" />
84
85   <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
86   <Import Project="$(ProjectDir)..\dependencies.props" />
87
88   <!-- Add test-specific package restore sources. -->
89   <PropertyGroup>
90     <RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
91       https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json;
92       $(RestoreSources)
93     </RestoreSources>
94     <RestoreSources Condition="'$(IntermediateAzureFeed)' != ''">
95       $(IntermediateAzureFeed);
96       $(RestoreSources)
97     </RestoreSources>
98   </PropertyGroup>
99
100   <!-- Use Roslyn Compilers to build -->
101   <Import Project="$(RoslynPropsFile)" Condition="Exists('$(RoslynPropsFile)')" />
102
103   <PropertyGroup Condition="'$(BuildAllProjects)'=='true'">
104     <!-- When we do a traversal build we get all packages up front, don't restore them again -->
105     <RestorePackages>false</RestorePackages>
106   </PropertyGroup>
107
108   <PropertyGroup Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'">
109     <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
110   </PropertyGroup>
111
112   <!-- If we want to overwrite the desired CoreCLR package version, we need to get the new version from the generated props file in bin/obj -->
113   <Import Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'" Project="$(BuildVersionFile)" />
114
115   <PropertyGroup Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'">
116     <VersionToRestore Condition="'$(StableVersion)' != ''">$(StableVersion)</VersionToRestore>
117     <VersionToRestore Condition="'$(VersionToRestore)' == ''">$(PackageVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)</VersionToRestore>
118     <PackageVersionArg>/p:MicrosoftNETCoreRuntimeCoreCLRPackageVersion=$(VersionToRestore)</PackageVersionArg>
119   </PropertyGroup>
120
121   <!-- Which tests shall we build? Default: Priority 0 tests.
122     At the command-line, the user can specify /p:CLRTestPriorityToBuild=666 (for example), and
123     all tests with CLRTestPriority 666,..., 1 AND 0 will build. 
124     
125     Consequently, specifying CLRTestPriorityToBuild=1 will build all tests with CLRTestPriority 1 and 0.
126     
127     CLRTestPriority = 0 will build only priority 0 cases. 
128   
129     In other words, the CLRTestPriority cases of 0 are *essential* testcases. The higher the value,
130     the less priority we give them.
131    -->
132   <PropertyGroup>
133     <CLRTestPriorityToBuild>0</CLRTestPriorityToBuild>
134   </PropertyGroup>
135   
136 </Project>