summaryrefslogtreecommitdiff
path: root/tests/src/dir.common.props
blob: 5a7ee2e83ad3b7420de4761a37490673d012c3c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\dir.props" />

 <!-- Set default Configuration and Platform -->
  <PropertyGroup>
    <__BuildArch Condition="'$(__BuildArch)' == ''">x64</__BuildArch>
    <__BuildType Condition="'$(__BuildType)' == ''">Debug</__BuildType>
    <__BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</__BuildOS>
    <BuildArch>$(__BuildArch)</BuildArch>
    <BuildType>$(__BuildType)</BuildType>
    <BuildOS>$(__BuildOS)</BuildOS>
    <Configuration Condition="'$(Configuration)' ==''">$(BuildType)</Configuration>
    <Platform Condition="'$(Platform)'==''">$(BuildArch)</Platform>
  </PropertyGroup>
  
  <!-- Setup Default symbol and optimization for Configuration -->
  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
    <Optimize Condition="'$(Optimize)' == ''">false</Optimize>
    <DebugType Condition="'$(DebugType)' == ''">full</DebugType>
    <DefineConstants>$(DefineConstants);DEBUG;TRACE;XUNIT_PERF</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Release'">
    <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
    <Optimize Condition="'$(Optimize)' == ''">true</Optimize>
    <DebugType Condition="'$(DebugType)' == ''">pdbonly</DebugType>
    <DefineConstants>$(DefineConstants);TRACE;XUNIT_PERF</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Checked'">
    <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
    <Optimize Condition="'$(Optimize)' == ''">true</Optimize>
    <DebugType Condition="'$(DebugType)' == ''">full</DebugType>
    <DefineConstants>$(DefineConstants);DEBUG;TRACE;XUNIT_PERF</DefineConstants>
  </PropertyGroup>

<!-- Setup the default output and intermediate paths -->
  <PropertyGroup>
    <OSPlatformConfig>$(BuildOS).$(Platform).$(Configuration)</OSPlatformConfig>
    <BaseOutputPath>$(ProjectDir)\..\bin\tests</BaseOutputPath>
    <BaseOutputPath Condition="'$(__TestRootDir)' != ''">$(__TestRootDir)\</BaseOutputPath>
    <BaseOutputPathWithConfig>$(BaseOutputPath)\$(OSPlatformConfig)\</BaseOutputPathWithConfig>
    <BinDir>$(BaseOutputPathWithConfig)</BinDir>
    <BaseIntermediateOutputPath>$(ProjectDir)\..\bin\tests\obj\$(OSPlatformConfig)\Managed\</BaseIntermediateOutputPath>
    <BaseIntermediateOutputPath Condition="'$(__ManagedTestIntermediatesDir)' != ''">$(__ManagedTestIntermediatesDir)\</BaseIntermediateOutputPath>
    <__NativeTestIntermediatesDir Condition="'$(__NativeTestIntermediatesDir)' == ''">$([System.IO.Path]::GetFullPath($(BaseOutputPathWithConfig)..\obj\$(BuildOS).$(Platform).$(Configuration)\Native\))</__NativeTestIntermediatesDir>
    <BuildProjectRelativeDir>$(MSBuildProjectName)\</BuildProjectRelativeDir>
    <BuildProjectRelativeDir Condition="'$(MSBuildProjectDirectory.Contains($(SourceDir)))'">$([System.String]::Copy('$(MSBuildProjectDirectory)').Replace($(SourceDir),''))\$(MSBuildProjectName)</BuildProjectRelativeDir>
    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(BuildProjectRelativeDir)\</IntermediateOutputPath>
    <OutputPath>$(BaseOutputPathWithConfig)$(BuildProjectRelativeDir)\</OutputPath>
    <TestWorkingDir Condition="'$(TestWorkingDir)'==''">$(BaseOutputPath)\testStagingDir\</TestWorkingDir>
    <TestPath Condition="'$(TestPath)'==''">$(TestWorkingDir)$(OSPlatformConfig)\$(MSBuildProjectName)/</TestPath>
  </PropertyGroup>

  <!-- Setup the output location for the project.json generated for the local CoreCLR build. -->
  <PropertyGroup>
    <TestRuntimeProjectJsonDir>$(BaseOutputPath)\test_runtime</TestRuntimeProjectJsonDir>
    <TestRuntimeProjectJson>$(TestRuntimeProjectJsonDir)\project.json</TestRuntimeProjectJson>
    <TestRuntimeProjectLockJson>$(TestRuntimeProjectJsonDir)\project.lock.json</TestRuntimeProjectLockJson>
  </PropertyGroup>


</Project>