Merge pull request #23308 from dotnet-maestro-bot/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   <!--
4     $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
5   -->
6   <PropertyGroup>
7     <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
8     <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
9   </PropertyGroup>
10   
11   <Import Project="dir.sdkbuild.props" Condition="'$(UsingMicrosoftNETSdk)' == 'true'"  />
12
13   <PropertyGroup>
14     <LangVersion>8.0</LangVersion>
15     <UseSharedCompilation>true</UseSharedCompilation>
16   </PropertyGroup>
17
18     <!--
19      Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
20      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.
21      
22      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
23      Roslyn NuGet package which has a Csc task supporting OverrideToolHost, but the default BuildTools CSharpCore targets file does specify 
24      OverrideToolHost. The result is that building anything in C# when RunningOnCore=true on Windows fails in Csc task with a parameter not supported error.
25      
26      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
27      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
28      instead we could just move to using dotnet officially.
29      -->  
30   <PropertyGroup>  
31     <RunningOnCore>false</RunningOnCore>
32     <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'core'">true</RunningOnCore>
33     <BuildToolsTargetsDesktop>false</BuildToolsTargetsDesktop>
34     <BuildToolsTargetsDesktop Condition="'$(RunningOnCore)' != 'true'">true</BuildToolsTargetsDesktop>
35     <BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
36     <RunningOnUnix Condition="('$(RunningOnUnix)' == '') And ('$(MSBuildRuntimeType)' == 'Core') And ('$(OS)'!='Windows_NT')">true</RunningOnUnix>
37     <UseBuildTools>true</UseBuildTools>
38   </PropertyGroup>  
39
40   <!-- Common repo directories -->
41   <PropertyGroup>
42     <CopyNuGetImplementations Condition="'$(CopyNuGetImplementations)'==''">false</CopyNuGetImplementations>
43     <ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
44     <SourceDir>$(ProjectDir)src\</SourceDir>
45     <PackagesDir>$(ProjectDir)..\packages\</PackagesDir>
46     <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)..\Tools\</ToolsDir>
47     <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ProjectDir)..\.dotnet\</DotnetCliPath>
48     <BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net46\</BuildToolsTaskDir>
49     <OverrideToolHost Condition="'$(OS)' != 'Windows_NT'">$(DotnetCliPath)dotnet</OverrideToolHost>
50     <!-- 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
51          the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
52     <_TargetFrameworkDirectories Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
53     <_FullFrameworkReferenceAssemblyPaths Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
54     <ExcludeSigningImport>true</ExcludeSigningImport>
55   </PropertyGroup>
56
57   <!-- Common properties -->
58   <PropertyGroup>
59     <RootBinDir>$(__RootBinDir)\</RootBinDir>
60     <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)..\bin\</RootBinDir>
61
62     <BinDir>$(__BinDir)\</BinDir>
63     <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
64
65     <CoreCLRBinDir>$(RootBinDir)Product\$(__BuildOS).$(__BuildArch).$(__BuildType)\</CoreCLRBinDir>
66
67     <AltJitArch>$(__AltJitArch)</AltJitArch>
68   </PropertyGroup>
69
70 <!-- Default Test platform to deploy the netstandard compiled tests to -->
71   <PropertyGroup>
72     <!-- we default TestTFM and FilterToTestTFM to netcoreapp1.0 if they are not explicity defined -->
73     <DefaultTestTFM Condition="'$(DefaultTestTFM)'==''">netcoreapp1.0</DefaultTestTFM>
74     <TestTFM Condition="'$(TestTFM)'==''">$(DefaultTestTFM)</TestTFM>
75     <FilterToTestTFM Condition="'$(FilterToTestTFM)'==''">$(DefaultTestTFM)</FilterToTestTFM>
76   </PropertyGroup>
77
78   <!-- Output paths -->
79   <PropertyGroup>
80     <!-- When not using the SKD, we want to set this property here so
81          that BuildVersionFile gets the correct value. -->
82     <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == '' Or '$(UsingMicrosoftNETSdk)' != 'true'">$(RootBinDir)obj\</BaseIntermediateOutputPath>
83     <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</IntermediateOutputPath>
84     <OutputPath Condition="'$(OutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</OutputPath>
85   </PropertyGroup>
86
87     <!-- Targeting Package paths -->
88   <PropertyGroup>
89     <TargetingPackPath Condition="'$(BaseTargetingPackPath)' == ''">$(RootBinDir)TargetingPack\</TargetingPackPath>
90   </PropertyGroup>
91
92   <!-- Import Build tools common props file where repo-independent properties are found -->
93   <Import Condition="Exists('$(ToolsDir)Build.Common.props') And '$(UseBuildTools)'=='true'" Project="$(ToolsDir)Build.Common.props" />
94
95   <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
96   <Import Project="$(ProjectDir)..\dependencies.props" />
97
98   <!-- Add test-specific package restore sources. -->
99   <PropertyGroup>
100     <RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
101       https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json;
102       $(RestoreSources)
103     </RestoreSources>
104     <RestoreSources Condition="'$(IntermediateAzureFeed)' != ''">
105       $(IntermediateAzureFeed);
106       $(RestoreSources)
107     </RestoreSources>
108   </PropertyGroup>
109
110   <!-- Use Roslyn Compilers to build -->
111   <Import Project="$(RoslynPropsFile)" Condition="Exists('$(RoslynPropsFile)')" />
112
113   <PropertyGroup Condition="'$(BuildAllProjects)'=='true'">
114     <!-- When we do a traversal build we get all packages up front, don't restore them again -->
115     <RestorePackages>false</RestorePackages>
116   </PropertyGroup>
117
118   <PropertyGroup Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'">
119     <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
120   </PropertyGroup>
121
122   <!-- 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 -->
123   <Import Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'" Project="$(BuildVersionFile)" />
124
125   <PropertyGroup Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'">
126     <VersionToRestore Condition="'$(StableVersion)' != ''">$(StableVersion)</VersionToRestore>
127     <VersionToRestore Condition="'$(VersionToRestore)' == ''">$(PackageVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)</VersionToRestore>
128     <PackageVersionArg>/p:MicrosoftNETCoreRuntimeCoreCLRPackageVersion=$(VersionToRestore)</PackageVersionArg>
129   </PropertyGroup>
130
131   <!-- Which tests shall we build? Default: Priority 0 tests.
132     At the command-line, the user can specify /p:CLRTestPriorityToBuild=666 (for example), and
133     all tests with CLRTestPriority 666,..., 1 AND 0 will build. 
134     
135     Consequently, specifying CLRTestPriorityToBuild=1 will build all tests with CLRTestPriority 1 and 0.
136     
137     CLRTestPriority = 0 will build only priority 0 cases. 
138   
139     In other words, the CLRTestPriority cases of 0 are *essential* testcases. The higher the value,
140     the less priority we give them.
141    -->
142   <PropertyGroup>
143     <CLRTestPriorityToBuild>0</CLRTestPriorityToBuild>
144   </PropertyGroup>
145   
146 </Project>