未验证 提交 736b3042 编写于 作者: T Tomáš Rylek 提交者: GitHub

Remove the directory src/coreclr/tests/src (#42139)

Move CLRTest.*.targets under src/tests/Common;

Consolidate Directory.Build.props in src/tests, src/tests/Common and src/coreclr/tests/src - src/tests is now the "master" version, src/tests/Common just points to it and src/coreclr/tests/src no longer exists;

Move Directory.Build.targets from src/coreclr/tests/src to src/tests/Directory.Build.targets that was previously just importing the src/coreclr/tests/src version;

Move the few remaining scripts under src/coreclr/tests/src to src/tests/Common (dirs.proj, nobuild.targets, runonly.targets, xunitconsolerunner.depproj).

Thanks

Tomas
上级 9f72b3a3
......@@ -169,7 +169,7 @@
</Target>
<Target Name="PrepareCorrelationPayloadDirectory">
<MSBuild Projects="src\xunitconsolerunner.depproj" Targets="Restore" />
<MSBuild Projects="$(RepoRoot)src\tests\Common\xunitconsolerunner.depproj" Targets="Restore" />
<ItemGroup>
<_XUnitConsoleRunnerFiles Include="$(NuGetPackageRoot)$(MicrosoftDotNetXUnitConsoleRunnerPackage)\$(MicrosoftDotNetXUnitConsoleRunnerVersion)\**\xunit.console.*" />
......
<Project>
<!-- SDK Style projects auto-magically include this file. -->
<Import Project="..\Directory.Build.props" />
<!-- 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>
<BaseOutputPath>$(RepoRoot)\artifacts\tests\coreclr</BaseOutputPath>
<BaseOutputPath Condition="'$(__TestRootDir)' != ''">$(__TestRootDir)</BaseOutputPath>
<BaseOutputPathWithConfig>$(BaseOutputPath)\$(OSPlatformConfig)\</BaseOutputPathWithConfig>
<BinDir>$(BaseOutputPathWithConfig)</BinDir>
<BaseIntermediateOutputPath>$(RepoRoot)\artifacts\tests\coreclr\obj\$(OSPlatformConfig)\Managed\</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath Condition="'$(__ManagedTestIntermediatesDir)' != ''">$(__ManagedTestIntermediatesDir)\</BaseIntermediateOutputPath>
<__NativeTestIntermediatesDir Condition="'$(__NativeTestIntermediatesDir)' == ''">$([System.IO.Path]::GetFullPath($(BaseOutputPathWithConfig)..\..\coreclr\obj\$(TargetOS).$(TargetArchitecture).$(Configuration)\Native\))</__NativeTestIntermediatesDir>
<BuildProjectRelativeDir>$(MSBuildProjectName)\</BuildProjectRelativeDir>
<BuildProjectRelativeDir Condition="'$(MSBuildProjectDirectory.Contains($(TestSourceDir)))'">$([System.String]::Copy('$(MSBuildProjectDirectory)').Replace($(TestSourceDir),''))\$(MSBuildProjectName)</BuildProjectRelativeDir>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(BuildProjectRelativeDir)\</IntermediateOutputPath>
<OutputPath>$(BaseOutputPathWithConfig)$(BuildProjectRelativeDir)\</OutputPath>
<SkipXunitDependencyCopying>true</SkipXunitDependencyCopying>
</PropertyGroup>
<!-- Disable some standard properties for building our projects -->
<PropertyGroup>
<NoExplicitReferenceToStdLib>true</NoExplicitReferenceToStdLib>
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<!-- Disable some C# warnings for the tests. -->
<NoWarn>78,162,164,168,169,219,251,252,414,429,642,649,652,675,1691,1717,1718,3001,3002,3003,3005,3008</NoWarn>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<SkipSigning Condition="'$(CrossGen)' == 'true'">true</SkipSigning>
<AssemblyKey>Test</AssemblyKey>
<GenerateDependencyFile>false</GenerateDependencyFile>
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<UseAppHost>false</UseAppHost>
</PropertyGroup>
<!-- Setup properties per TargetOS -->
<Choose>
<When Condition="'$(TargetOS)'=='AnyOS'">
<PropertyGroup>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='Windows_NT'">
<PropertyGroup>
<!-- Since cross compilation of test builds on Windows is possible, the
TargetsWindows property may already be set. Only set the property if
it is not already defined -->
<TargetsWindows Condition="'$(TargetsWindows)' == ''" >true</TargetsWindows>
<TestNugetRuntimeId>win-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='Linux'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsLinux>true</TargetsLinux>
<TestNugetRuntimeId>ubuntu.14.04-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='OSX'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsOSX>true</TargetsOSX>
<TestNugetRuntimeId>osx.10.12-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='FreeBSD'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsFreeBSD>true</TargetsFreeBSD>
<TestNugetRuntimeId>ubuntu.14.04-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='NetBSD'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsNetBSD>true</TargetsNetBSD>
<TestNugetRuntimeId>ubuntu.14.04-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='illumos'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsIllumos>true</TargetsIllumos>
<TestNugetRuntimeId>ubuntu.14.04-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='Solaris'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsSolaris>true</TargetsSolaris>
<TestNugetRuntimeId>ubuntu.14.04-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
</Choose>
<!-- Set arch specific properties -->
<PropertyGroup>
<TargetBits>32</TargetBits>
<TargetBits Condition="'$(TargetArchitecture)'=='x64'">64</TargetBits>
<TargetBits Condition="'$(TargetArchitecture)'=='arm64'">64</TargetBits>
</PropertyGroup>
<PropertyGroup>
<TargetRid>$(__RuntimeId)</TargetRid>
<TargetRid Condition="'$(TargetRid)' == ''">$(TestNugetRuntimeId)</TargetRid>
</PropertyGroup>
<!-- The IL SDK adds a packagereference to the native ilasm package,
but does not detect musl or rhel, so we set the RID
ourselves. If we passed in a proper host RID from the build
scripts, we could also use that instead of relying on the IL
SDK RID detection. -->
<PropertyGroup>
<MicrosoftNetCoreIlasmPackageRuntimeId Condition=" '$(TargetRid)' == 'linux-musl-x64' ">$(TargetRid)</MicrosoftNetCoreIlasmPackageRuntimeId>
<MicrosoftNetCoreIlasmPackageRuntimeId Condition=" '$(TargetRid)' == 'rhel.6-x64' ">$(TargetRid)</MicrosoftNetCoreIlasmPackageRuntimeId>
</PropertyGroup>
<PropertyGroup>
<TargetsUnknownUnix Condition="'$(TargetsUnix)' == 'true' AND '$(TargetOS)' != 'FreeBSD' AND '$(TargetOS)' != 'Linux' AND '$(TargetOS)' != 'NetBSD' AND '$(TargetOS)' != 'OSX' AND '$(TargetOS)' != 'illumos' AND '$(TargetOS)' != 'Solaris'">true</TargetsUnknownUnix>
<Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.csproj'">C#</Language>
<Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.fsproj'">F#</Language>
<Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.ilproj'">IL</Language>
</PropertyGroup>
<!-- Don't reference the mscorlib facade -->
<PropertyGroup>
<ExcludeMscorlibFacade>true</ExcludeMscorlibFacade>
</PropertyGroup>
<!-- Set default ZapRequire level (used only when CrossGen is enabled) -->
<PropertyGroup>
<ZapRequire Condition="'$(ZapRequire)' == ''">2</ZapRequire>
</PropertyGroup>
<PropertyGroup>
<RestoreOutputPath>$(MSBuildProjectDirectory)\obj</RestoreOutputPath>
<!-- Specify the target framework of the common test dependency project.json. -->
<NuGetTargetMoniker>$(NetCoreAppCurrentTargetFrameworkMoniker)</NuGetTargetMoniker>
<NuGetTargetMonikerShort>$(NetCoreAppCurrent)</NuGetTargetMonikerShort>
</PropertyGroup>
</Project>
<Project>
<!-- Default priority building values. -->
<PropertyGroup>
<CLRTestKind Condition="'$(CLRTestKind)' == '' and '$(OutputType)' == 'Library'">SharedLibrary</CLRTestKind>
<CLRTestKind Condition="'$(CLRTestKind)' == ''">BuildAndRun</CLRTestKind>
<CLRTestPriority Condition="'$(CLRTestPriority)' == ''">0</CLRTestPriority>
</PropertyGroup>
<!-- All CLRTests need to be of a certain "kind". These kinds are enumerated below.
By default all tests are BuildAndRun. This means that the build system will Build them
and construct a run-batch-script for them. -->
<Choose>
<When Condition=" '$(CLRTestKind)'=='SharedLibrary'">
<PropertyGroup>
<_CLRTestCompilesSource>true</_CLRTestCompilesSource>
<_CLRTestNeedsToRun>false</_CLRTestNeedsToRun>
<GenerateRunScript>false</GenerateRunScript>
<_CLRTestBuildsExecutable>false</_CLRTestBuildsExecutable>
</PropertyGroup>
</When>
<When Condition=" '$(CLRTestKind)'=='BuildAndRun' ">
<PropertyGroup>
<GenerateRunScript>true</GenerateRunScript>
<_CLRTestNeedsToRun>true</_CLRTestNeedsToRun>
<_CLRTestCompilesSource>true</_CLRTestCompilesSource>
<_CLRTestBuildsExecutable>true</_CLRTestBuildsExecutable>
</PropertyGroup>
</When>
<When Condition=" '$(CLRTestKind)'=='BuildOnly'">
<PropertyGroup>
<_CLRTestNeedsToRun>false</_CLRTestNeedsToRun>
<GenerateRunScript>false</GenerateRunScript>
<_CLRTestCompilesSource>true</_CLRTestCompilesSource>
<_CLRTestBuildsExecutable>true</_CLRTestBuildsExecutable>
</PropertyGroup>
</When>
<When Condition=" '$(CLRTestKind)'=='RunOnly' ">
<PropertyGroup>
<GenerateRunScript>true</GenerateRunScript>
<SkipSigning>true</SkipSigning>
<_CLRTestBuildsExecutable>false</_CLRTestBuildsExecutable>
<_CLRTestNeedsToRun>true</_CLRTestNeedsToRun>
<_CLRTestCompilesSource>false</_CLRTestCompilesSource>
</PropertyGroup>
</When>
</Choose>
<PropertyGroup>
<_CLRTestNeedsProjectToRun>false</_CLRTestNeedsProjectToRun>
<_CLRTestNeedsProjectToRun Condition=" '$(_CLRTestNeedsToRun)' and '!$(_CLRTestBuildsExecutable)' ">true</_CLRTestNeedsProjectToRun>
</PropertyGroup>
<PropertyGroup>
<!-- Since bug in Roslyn for Linux empty DebugType property leads to build failure. See issue Roslyn@20343 -->
<DebugType Condition=" '$(DebugType)' == '' and '$(RunningOnUnix)' == 'true' ">None</DebugType>
</PropertyGroup>
<!--
If it needs ProjectToRun, turn the project into a ProjectReference so it gets built
-->
<ItemGroup Condition=" $(_CLRTestNeedsProjectToRun) ">
<ProjectReference Include="$(CLRTestProjectToRun)">
<Private>false</Private>
</ProjectReference>
</ItemGroup>
<Import Project="..\Directory.Build.targets" />
<!-- Determine if this project should be built or not -->
<PropertyGroup>
<BuildAllProjects Condition="'$(BuildAllProjects)' == ''">false</BuildAllProjects>
<_WillCLRTestProjectBuild Condition="'$(_WillCLRTestProjectBuild)' == ''">false</_WillCLRTestProjectBuild>
<_WillCLRTestProjectBuild Condition="'$(BuildAllProjects)' != 'true'">true</_WillCLRTestProjectBuild>
<_WillCLRTestProjectBuild Condition="'$(BuildAllProjects)' == 'true' And '$(CLRTestPriority)' &lt;= '$(CLRTestPriorityToBuild)'">true</_WillCLRTestProjectBuild>
<_WillCLRTestProjectBuild Condition="'$(CLRTestBuildAllTargets)' != 'allTargets' And '$(CLRTestTargetUnsupported)' == 'true'">false</_WillCLRTestProjectBuild>
<_WillCLRTestProjectBuild Condition="'$(DisableProjectBuild)' == 'true'">false</_WillCLRTestProjectBuild>
</PropertyGroup>
<PropertyGroup>
<_CopyNativeProjectBinaries>$(CopyNativeProjectBinaries)</_CopyNativeProjectBinaries>
<_CopyNativeProjectBinaries Condition="'$(_WillCLRTestProjectBuild)' != 'true'">false</_CopyNativeProjectBinaries>
<_CopyNativeProjectBinaries Condition="'$(_CopyNativeProjectBinaries)' == ''">true</_CopyNativeProjectBinaries>
</PropertyGroup>
<!-- if we have determined that there is nothing to build, overwrite the build targets so that nothing happens -->
<Import Project="nobuild.targets" Condition="'$(_WillCLRTestProjectBuild)' == 'false'" />
<!-- RunOnly projects have a special build for dependent projects -->
<Import Project="runonly.targets" Condition="'$(CLRTestKind)' == 'RunOnly'" />
<Import Project="..\override.targets" Condition="Exists('..\override.targets')"/>
<!-- We enable auto-unification of assembly references after importing the common targets. Binding redirects are not needed
for coreclr since it auto-unifies, so the warnings we get without this setting are just noise -->
<PropertyGroup>
<AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
</PropertyGroup>
<!-- Project language -->
<!-- TODO: This might just be the Language property -->
<PropertyGroup Condition="'$(ProjectLanguage)' == ''">
<ProjectLanguage Condition="'$(MSBuildProjectExtension)' == '.ilproj' OR '$(Language)' == 'IL'">IL</ProjectLanguage>
<ProjectLanguage Condition="'$(MSBuildProjectExtension)' == '.csproj' OR '$(Language)' == 'C#' OR '$(ProjectLanguage)'==''">CSharp</ProjectLanguage>
<SkipImportILTargets Condition="'$(CLRTestPriority)' &gt; '$(CLRTestPriorityToBuild)'">true</SkipImportILTargets>
<SkipImportILTargets Condition="'$(CLRTestBuildAllTargets)' != '' And '$(CLRTestNeedTarget)' != '$(CLRTestBuildAllTargets)'">true</SkipImportILTargets>
</PropertyGroup>
<Target Name="CopyNativeProjectBinaries" Condition="'$(_CopyNativeProjectBinaries)' == 'true'">
<ItemGroup>
<NativeProjectBinaries Condition="'$(RunningOnUnix)' != 'true'" Include="$(NativeProjectOutputFolder)\**\*.*" />
<!-- ############################################################### -->
<!-- The following is unix only. It is required because the unix test-->
<!-- build, unlike the windows test build, do not place the binaries -->
<!-- built into a separate Debug/Checked/Release directory. Therefore-->
<!-- we must filter the folder to only include dynamic libraries, -->
<!-- static libraries and executables. -->
<!-- -->
<!-- Please take care when modifying the following lines of code. -->
<!-- At a minimum to test any changes to the below, please run a -->
<!-- pri1 test build. -->
<!-- ############################################################### -->
<!-- Include everything and then filter. -->
<NativeProjectBinariesMatched Condition="'$(RunningOnUnix)' == 'true'" Include="$(NativeProjectOutputFolder)\**\*.*" />
<!-- Filter executables on unix -->
<NativeProjectBinariesExeFilter Condition="'$(RunningOnUnix)' == 'true' and $([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `(.*\/)([^.]+)$`))" Include="@(NativeProjectBinariesMatched)" />
<!-- Filter out the *Make* files -->
<NativeProjectBinariesExeFilterRemovedMakeFile Condition="'$(RunningOnUnix)' == 'true' and !$([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `.*Makefile.*`))" Include="@(NativeProjectBinariesExeFilter)" />
<!-- Filter out the CMakeFiles files -->
<NativeProjectBinariesExeFilterRemovedCMakeFile Condition="'$(RunningOnUnix)' == 'true' and !$([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `.*CMakeFiles.*`))" Include="@(NativeProjectBinariesExeFilterRemovedMakeFile)" />
<!-- Filter .dylib files on OSX -->
<NativeProjectBinariesDyLibFilter Condition="'$(TargetOS)' == 'OSX' and $([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `(.*\/).*\.dylib`))" Include="@(NativeProjectBinariesMatched)" />
<!-- Filter .so files on non-OSX Unix -->
<NativeProjectBinariesDyLibFilter Condition="'$(RunningOnUnix)' == 'true' and '$(TargetOS)' != 'OSX' and $([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `(.*\/).*\.so`))" Include="@(NativeProjectBinariesMatched)" />
<!-- Filter static lib files on Unix -->
<NativeProjectBinariesStaticLibFilter Condition="'$(RunningOnUnix)' == 'true' and $([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `(.*\/).*\.a`))" Include="@(NativeProjectBinariesMatched)" />
<!-- Merge the filtered lists -->
<NativeProjectBinaries Condition="'$(RunningOnUnix)' == 'true'" Include="@(NativeProjectBinariesExeFilterRemovedCMakeFile)" />
<NativeProjectBinaries Condition="'$(RunningOnUnix)' == 'true'" Include="@(NativeProjectBinariesDyLibFilter)" />
<NativeProjectBinaries Condition="'$(RunningOnUnix)' == 'true'" Include="@(NativeProjectBinariesStaticLibFilter)" />
</ItemGroup>
<!-- There are currently no native project binaries on wasm -->
<Error Text="The native project files are missing in $(NativeProjectOutputFolder) please run build from the root of the repo at least once"
Condition="'@(NativeProjectBinaries)' == '' And '$(TargetArchitecture)' != 'wasm'" />
<Copy
SourceFiles="@(NativeProjectBinaries)"
DestinationFiles="@(NativeProjectBinaries -> '$(OutDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
<Target Name="ResolveCmakeNativeProjectReference"
Condition="'@(ProjectReference)' != ''"
BeforeTargets="ConsolidateNativeProjectReference;BeforeResolveReferences;BeforeClean" >
<ItemGroup>
<NativeProjectReference Include="%(ProjectReference.Identity)" Condition="$([System.String]::Copy(%(ProjectReference.FileName)).ToUpper()) == 'CMAKELISTS'" />
<ProjectReference Remove="%(NativeProjectReference.Identity)" />
<NativeProjectReferenceNormalized Include="@(NativeProjectReference -> '%(FullPath)')" />
</ItemGroup>
</Target>
<Target Name="ConsolidateNativeProjectReference"
Condition="'$(_CopyNativeProjectBinaries)' == 'true'"
BeforeTargets="Build" >
<ItemGroup Condition="'@(NativeProjectReferenceNormalized)' != ''">
<NativeProjectOutputFoldersToCopy Include="$([System.String]::Copy('%(NativeProjectReferenceNormalized.RelativeDir)').Replace($(TestSourceDir),$(__NativeTestIntermediatesDir)\))" Condition="'$(RunningOnUnix)' == 'true'" />
<NativeProjectOutputFoldersToCopy Include="$([System.String]::Copy('%(NativeProjectReferenceNormalized.RelativeDir)').Replace($(TestSourceDir),$(__NativeTestIntermediatesDir)\))$(Configuration)\" Condition="'$(RunningOnUnix)' != 'true'" />
</ItemGroup>
<Message Text= "Full native project references are :%(NativeProjectReferenceNormalized.Identity)" />
<Message Text= "Native binaries will be copied from :%(NativeProjectOutputFoldersToCopy.Identity)" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="CopyNativeProjectBinaries" Properties="NativeProjectOutputFolder=%(NativeProjectOutputFoldersToCopy.Identity)" Condition="'@(NativeProjectReference)' != ''" />
</Target>
<Target Name="CopyAllNativeProjectReferenceBinaries" DependsOnTargets="ResolveCmakeNativeProjectReference;ConsolidateNativeProjectReference" />
<!-- Build shell or command scripts whenever we copy native binaries -->
<Import Project="CLRTest.Execute.targets" />
<Target Name="CreateExecuteScript"
BeforeTargets="Build;CopyAllNativeProjectReferenceBinaries"
Condition="'$(CLRTestBuildAllTargets)' != 'allTargets' And '$(GenerateRunScript)' != 'false' And ('$(_WillCLRTestProjectBuild)' == 'true')"
DependsOnTargets="GenerateExecutionScriptsInternal" />
<Target Name="UpdateReferenceItems"
BeforeTargets="BeforeResolveReferences"
>
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="GetLiveRefAssemblies"
Condition="'$(ReferenceSystemPrivateCoreLib)' != 'true'">
<Output TaskParameter="TargetOutputs" ItemName="Reference" />
</MSBuild>
<ItemGroup>
<Reference Include="$(TargetingPackPath)/*.dll" >
<Private>false</Private>
</Reference>
</ItemGroup>
</Target>
<Target Name="GetLiveRefAssemblies" Returns="@(LibrariesRefAssembliesDlls)"
DependsOnTargets="ResolveLibrariesFromLocalBuild">
<ItemGroup>
<LibrariesRefAssembliesDlls Include="@(LibrariesRefAssemblies)" Condition="'%(Extension)' == '.dll'" Private="false" />
</ItemGroup>
</Target>
<Target Name="AfterBuild">
<Copy SourceFiles="$(AssemblyName).reflect.xml"
DestinationFolder="$(OutputPath)"
Condition="Exists('$(AssemblyName).reflect.xml')"/>
</Target>
<PropertyGroup>
<ProjectAssetsFile>$(RepoRoot)src\tests\Common\test_dependencies\obj\project.assets.json</ProjectAssetsFile>
</PropertyGroup>
<PropertyGroup Condition="'$(ReferenceSystemPrivateCoreLib)' == 'true' and '$(UsingMicrosoftNETSdk)' != 'true'">
<ProjectAssetsFile></ProjectAssetsFile>
</PropertyGroup>
<PropertyGroup>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
</PropertyGroup>
<PropertyGroup>
<IncludeOOBLibraries>true</IncludeOOBLibraries>
<LibrariesConfiguration>Release</LibrariesConfiguration>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)liveBuilds.targets"/>
<Import Project="$(MSBuildProjectFullPath).targets" Condition="Exists('$(MSBuildProjectFullPath).targets')"/>
<Import Project="../../clr.featuredefines.props" />
</Project>
......@@ -8,7 +8,7 @@ This file contains the logic for correctly hooking up a mock hostpolicy to a tes
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)/../../../tests/Common/hostpolicymock/CMakeLists.txt" />
<ProjectReference Include="$(MSBuildThisFileDirectory)hostpolicymock/CMakeLists.txt" />
<!-- %28 decodes to '('. It's needed to keep MSBuild from trying to parse $(pwd) as an MSBuild property -->
<CLRTestBashEnvironmentVariable Include="export MOCK_HOSTPOLICY=$%28pwd)/libhostpolicy" />
<!-- %25 decodes to '%'. It's needed to keep %cd itself from being decoded since we want '%cd%' directly in the script. -->
......
<Project>
<!-- SDK Style projects auto-magically include this file. -->
<Import Project="..\Directory.Build.props" />
</Project>
......@@ -120,7 +120,7 @@
</Target>
<Import Project="..\dir.traversal.targets" />
<Import Project="$(RepoRoot)src\coreclr\tests\dir.traversal.targets" />
<!-- Override clean from dir.traversal.targets and just remove the full BinDir -->
<Target Name="Clean">
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="../coreclr/tests/src/Directory.Build.props" />
<!-- SDK Style projects auto-magically include this file. -->
<Import Project="..\coreclr\tests\Directory.Build.props" />
<!-- 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>
<BaseOutputPath>$(RepoRoot)\artifacts\tests\coreclr</BaseOutputPath>
<BaseOutputPath Condition="'$(__TestRootDir)' != ''">$(__TestRootDir)</BaseOutputPath>
<BaseOutputPathWithConfig>$(BaseOutputPath)\$(OSPlatformConfig)\</BaseOutputPathWithConfig>
<BinDir>$(BaseOutputPathWithConfig)</BinDir>
<BaseIntermediateOutputPath>$(RepoRoot)\artifacts\tests\coreclr\obj\$(OSPlatformConfig)\Managed\</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath Condition="'$(__ManagedTestIntermediatesDir)' != ''">$(__ManagedTestIntermediatesDir)\</BaseIntermediateOutputPath>
<__NativeTestIntermediatesDir Condition="'$(__NativeTestIntermediatesDir)' == ''">$([System.IO.Path]::GetFullPath($(BaseOutputPathWithConfig)..\..\coreclr\obj\$(TargetOS).$(TargetArchitecture).$(Configuration)\Native\))</__NativeTestIntermediatesDir>
<BuildProjectRelativeDir>$(MSBuildProjectName)\</BuildProjectRelativeDir>
<BuildProjectRelativeDir Condition="'$(MSBuildProjectDirectory.Contains($(TestSourceDir)))'">$([System.String]::Copy('$(MSBuildProjectDirectory)').Replace($(TestSourceDir),''))\$(MSBuildProjectName)</BuildProjectRelativeDir>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(BuildProjectRelativeDir)\</IntermediateOutputPath>
<OutputPath>$(BaseOutputPathWithConfig)$(BuildProjectRelativeDir)\</OutputPath>
<SkipXunitDependencyCopying>true</SkipXunitDependencyCopying>
</PropertyGroup>
<!-- Disable some standard properties for building our projects -->
<PropertyGroup>
<NoExplicitReferenceToStdLib>true</NoExplicitReferenceToStdLib>
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<!-- Disable some C# warnings for the tests. -->
<NoWarn>78,162,164,168,169,219,251,252,414,429,642,649,652,675,1691,1717,1718,3001,3002,3003,3005,3008</NoWarn>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<SkipSigning Condition="'$(CrossGen)' == 'true'">true</SkipSigning>
<AssemblyKey>Test</AssemblyKey>
<GenerateDependencyFile>false</GenerateDependencyFile>
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<UseAppHost>false</UseAppHost>
</PropertyGroup>
<!-- Setup properties per TargetOS -->
<Choose>
<When Condition="'$(TargetOS)'=='AnyOS'">
<PropertyGroup>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='Windows_NT'">
<PropertyGroup>
<!-- Since cross compilation of test builds on Windows is possible, the
TargetsWindows property may already be set. Only set the property if
it is not already defined -->
<TargetsWindows Condition="'$(TargetsWindows)' == ''" >true</TargetsWindows>
<TestNugetRuntimeId>win-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='Linux'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsLinux>true</TargetsLinux>
<TestNugetRuntimeId>ubuntu.14.04-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='OSX'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsOSX>true</TargetsOSX>
<TestNugetRuntimeId>osx.10.12-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='FreeBSD'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsFreeBSD>true</TargetsFreeBSD>
<TestNugetRuntimeId>ubuntu.14.04-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='NetBSD'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsNetBSD>true</TargetsNetBSD>
<TestNugetRuntimeId>ubuntu.14.04-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='illumos'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsIllumos>true</TargetsIllumos>
<TestNugetRuntimeId>ubuntu.14.04-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)'=='Solaris'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsSolaris>true</TargetsSolaris>
<TestNugetRuntimeId>ubuntu.14.04-$(TargetArchitecture)</TestNugetRuntimeId>
</PropertyGroup>
</When>
</Choose>
<!-- Set arch specific properties -->
<PropertyGroup>
<TargetBits>32</TargetBits>
<TargetBits Condition="'$(TargetArchitecture)'=='x64'">64</TargetBits>
<TargetBits Condition="'$(TargetArchitecture)'=='arm64'">64</TargetBits>
</PropertyGroup>
<PropertyGroup>
<TargetRid>$(__RuntimeId)</TargetRid>
<TargetRid Condition="'$(TargetRid)' == ''">$(TestNugetRuntimeId)</TargetRid>
</PropertyGroup>
<!-- The IL SDK adds a packagereference to the native ilasm package,
but does not detect musl or rhel, so we set the RID
ourselves. If we passed in a proper host RID from the build
scripts, we could also use that instead of relying on the IL
SDK RID detection. -->
<PropertyGroup>
<MicrosoftNetCoreIlasmPackageRuntimeId Condition=" '$(TargetRid)' == 'linux-musl-x64' ">$(TargetRid)</MicrosoftNetCoreIlasmPackageRuntimeId>
<MicrosoftNetCoreIlasmPackageRuntimeId Condition=" '$(TargetRid)' == 'rhel.6-x64' ">$(TargetRid)</MicrosoftNetCoreIlasmPackageRuntimeId>
</PropertyGroup>
<PropertyGroup>
<TargetsUnknownUnix Condition="'$(TargetsUnix)' == 'true' AND '$(TargetOS)' != 'FreeBSD' AND '$(TargetOS)' != 'Linux' AND '$(TargetOS)' != 'NetBSD' AND '$(TargetOS)' != 'OSX' AND '$(TargetOS)' != 'illumos' AND '$(TargetOS)' != 'Solaris'">true</TargetsUnknownUnix>
<Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.csproj'">C#</Language>
<Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.fsproj'">F#</Language>
<Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.ilproj'">IL</Language>
</PropertyGroup>
<!-- Don't reference the mscorlib facade -->
<PropertyGroup>
<ExcludeMscorlibFacade>true</ExcludeMscorlibFacade>
</PropertyGroup>
<!-- Set default ZapRequire level (used only when CrossGen is enabled) -->
<PropertyGroup>
<ZapRequire Condition="'$(ZapRequire)' == ''">2</ZapRequire>
</PropertyGroup>
<PropertyGroup>
<RestoreOutputPath>$(MSBuildProjectDirectory)\obj</RestoreOutputPath>
<!-- Specify the target framework of the common test dependency project.json. -->
<NuGetTargetMoniker>$(NetCoreAppCurrentTargetFrameworkMoniker)</NuGetTargetMoniker>
<NuGetTargetMonikerShort>$(NetCoreAppCurrent)</NuGetTargetMonikerShort>
</PropertyGroup>
</Project>
此差异已折叠。
......@@ -3,7 +3,7 @@
<Import Project="Directory.Build.props" />
<ItemGroup>
<Project Include="$(CoreClrProjectRoot)tests\src\dirs.proj" />
<Project Include="$(MSBuildThisFileDirectory)Common\dirs.proj" />
</ItemGroup>
<Import Project="$(RepoRoot)\src\coreclr\tests\Directory.Build.targets" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册