Skip to content

Move runtime tests out of the coreclr folder (dev/infrastructure branch) #37977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions src/coreclr/build-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
set "__RepoRootDir=%__ProjectDir%\..\.."
for %%i in ("%__RepoRootDir%") do SET "__RepoRootDir=%%~fi"

set "__TestDir=%__ProjectDir%\tests"
set "__TestDir=%__RepoRootDir%\src\tests"
set "__ProjectFilesDir=%__TestDir%"
set "__SourceDir=%__ProjectDir%\src"
set "__RootBinDir=%__RepoRootDir%\artifacts"
set "__LogsDir=%__RootBinDir%\log"
set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs"

:: Default __Exclude to issues.targets
set __Exclude=%__TestDir%\issues.targets
set __Exclude=%__ProjectDir%\tests\issues.targets

REM __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:TargetArchitecture=x64)
set "__args= %*"
Expand Down Expand Up @@ -205,7 +205,7 @@ REM ============================================================================

if defined __SkipStressDependencies goto skipstressdependencies

call "%__TestDir%\setup-stress-dependencies.cmd" /arch %__BuildArch% /outputdir %__BinDir%
call "%__ProjectDir%\tests\setup-stress-dependencies.cmd" /arch %__BuildArch% /outputdir %__BinDir%
if errorlevel 1 (
echo %__ErrMsgPrefix%%__MsgPrefix%Error: setup-stress-dependencies failed.
goto :Exit_Failure
Expand Down
6 changes: 2 additions & 4 deletions src/coreclr/build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ generate_layout()
{
echo "${__MsgPrefix}Creating test overlay..."

__TestDir="$__ProjectDir"/tests
__ProjectFilesDir="$__TestDir"
__TestBinDir="$__TestWorkingDir"

Expand Down Expand Up @@ -125,7 +124,7 @@ generate_layout()
build_MSBuild_projects "Tests_Overlay_Managed" "${__ProjectDir}/tests/src/runtest.proj" "Creating test overlay" "/t:CreateTestOverlay"

if [[ "$__TargetOS" != "OSX" && "$__SkipStressDependencies" == 0 ]]; then
nextCommand="\"$__TestDir/setup-stress-dependencies.sh\" --arch=$__BuildArch --outputDir=$CORE_ROOT"
nextCommand="\"${__RepoRootDir}/src/coreclr/tests/setup-stress-dependencies.sh\" --arch=$__BuildArch --outputDir=$CORE_ROOT"
echo "Resolve runtime dependences via $nextCommand"
eval $nextCommand

Expand Down Expand Up @@ -273,7 +272,6 @@ build_Tests()
{
echo "${__MsgPrefix}Building Tests..."

__TestDir="$__ProjectDir"/tests
__ProjectFilesDir="$__TestDir"
__TestBinDir="$__TestWorkingDir"

Expand Down Expand Up @@ -683,7 +681,7 @@ __MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs"
# Set the remaining variables based upon the determined build configuration
__BinDir="$__RootBinDir/bin/coreclr/$__TargetOS.$__BuildArch.$__BuildType"
__PackagesBinDir="$__BinDir/.nuget"
__TestDir="$__ProjectDir/tests"
__TestDir="${__RepoRootDir}/src/tests"
__TestWorkingDir="$__RootBinDir/tests/coreclr/$__TargetOS.$__BuildArch.$__BuildType"
__IntermediatesDir="$__RootBinDir/obj/coreclr/$__TargetOS.$__BuildArch.$__BuildType"
__TestIntermediatesDir="$__RootBinDir/tests/coreclr/obj/$__TargetOS.$__BuildArch.$__BuildType"
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<!-- Common repo directories -->
<PropertyGroup>
<TestProjectDir>$(MSBuildThisFileDirectory)</TestProjectDir>
<TestSourceDir>$(MSBuildThisFileDirectory)src\</TestSourceDir>
<TestSourceDir>$([MSBuild]::NormalizePath('$(RepoRoot)/src/tests/'))</TestSourceDir>
</PropertyGroup>

<!-- Common properties -->
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tests/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<ItemGroup>
<RestoreProjects Include="$(MSBuildThisFileDirectory)scripts\scripts.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\test_dependencies\test_dependencies.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\CoreCLRTestLibrary\CoreCLRTestLibrary.csproj" />
<RestoreProjects Include="$(RepoRoot)src\tests\Common\CoreCLRTestLibrary\CoreCLRTestLibrary.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)external\external.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\ilasm\ilasm.ilproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tests/dir.common.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PropertyGroup>
<OSPlatformConfig>$(TargetOS).$(TargetArchitecture).$(Configuration)</OSPlatformConfig>

<TestSrcDir Condition="'$(TestSrcDir)' == ''">$(MSBuildThisFileDirectory)src</TestSrcDir>
<TestSrcDir Condition="'$(TestSrcDir)' == ''">$(RepoRoot)src\tests</TestSrcDir>
<BuildProjectRelativeDir>$([MSBuild]::MakeRelative($(TestSrcDir), $(MSBuildProjectDirectory)))\$(MSBuildProjectName)\</BuildProjectRelativeDir>

<!-- BaseIntermediateOutputPath is used by the SDK as the location
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tests/publishdependency.targets
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- These projects are individually restored in order. Each
subsequent restore only copies files that don't already exist
in CORE_ROOT, so assets from the first project file win. -->
<CoreRootProjectFiles Include="$(TestSourceDir)Common\test_dependencies\test_dependencies.csproj" />
<CoreRootProjectFiles Include="$(RepoRoot)src\coreclr\tests\src\Common\test_dependencies\test_dependencies.csproj" />
</ItemGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tests/src/CLRTest.MockHosting.targets
Original file line number Diff line number Diff line change
Expand Up @@ -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)/Common/hostpolicymock/CMakeLists.txt" />
<ProjectReference Include="$(MSBuildThisFileDirectory)/../../../tests/Common/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. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProjectAssetsFile>$(TestSourceDir)Common\Coreclr.TestWrapper\obj\project.assets.json</ProjectAssetsFile>
<ProjectAssetsFile>$(RepoRoot)src\coreclr\tests\src\Common\Coreclr.TestWrapper\obj\project.assets.json</ProjectAssetsFile>
<NuGetTargetMoniker>$(NetCoreAppCurrentTargetFrameworkMoniker)</NuGetTargetMoniker>
<NuGetTargetMonikerShort>$(NetCoreAppCurrent)</NuGetTargetMonikerShort>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Target Name="Build" DependsOnTargets="$(TraversalBuildDependsOn)" />

<PropertyGroup>
<ProjectAssetsFile>$(TestSourceDir)Common\test_dependencies\obj\project.assets.json</ProjectAssetsFile>
<ProjectAssetsFile>$(RepoRoot)src\coreclr\tests\src\Common\test_dependencies\obj\project.assets.json</ProjectAssetsFile>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)liveBuilds.targets" />
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/tests/src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@
Condition="'$(_CopyNativeProjectBinaries)' == 'true'"
BeforeTargets="Build" >
<ItemGroup Condition="'@(NativeProjectReferenceNormalized)' != ''">
<NativeProjectOutputFoldersToCopy Include="$([System.String]::Copy('%(NativeProjectReferenceNormalized.RelativeDir)').Replace($(TestSourceDir),$(__NativeTestIntermediatesDir)\src\))" Condition="'$(RunningOnUnix)' == 'true'" />
<NativeProjectOutputFoldersToCopy Include="$([System.String]::Copy('%(NativeProjectReferenceNormalized.RelativeDir)').Replace($(TestSourceDir),$(__NativeTestIntermediatesDir)\src\))$(Configuration)\" Condition="'$(RunningOnUnix)' != 'true'" />
<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)" />
Expand Down Expand Up @@ -230,7 +230,7 @@
</Target>

<PropertyGroup>
<ProjectAssetsFile>$(TestSourceDir)Common\test_dependencies\obj\project.assets.json</ProjectAssetsFile>
<ProjectAssetsFile>$(RepoRoot)src\coreclr\tests\src\Common\test_dependencies\obj\project.assets.json</ProjectAssetsFile>
</PropertyGroup>

<PropertyGroup Condition="'$(ReferenceSystemPrivateCoreLib)' == 'true' and '$(UsingMicrosoftNETSdk)' != 'true'">
Expand Down
52 changes: 28 additions & 24 deletions src/coreclr/tests/src/dirs.proj
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,29 @@
<Import Project="Directory.Build.props" />

<Target Name="ResolveDisabledProjects" BeforeTargets="BuildAllProjects;CopyAllNativeTestProjectBinaries" >
<PropertyGroup>
<TestRoot>$(RepoRoot)src\tests\</TestRoot>
</PropertyGroup>

<ItemGroup>
<DisabledProjects Include="TestWrappers*\**\*.csproj" />
<DisabledProjects Include="*\**\cs_template.csproj" />
<DisabledProjects Include="Common\Coreclr.TestWrapper\Coreclr.TestWrapper.csproj" />
<DisabledProjects Include="Common\test_dependencies\test_dependencies.csproj" />
<DisabledProjects Include="Common\CoreFX\TestFileSetup\CoreFX.TestUtils.TestFileSetup.csproj" />
<DisabledProjects Include="Common\PerfHarness\PerfHarness.csproj" />
<DisabledProjects Include="Common\stress_dependencies\stress_dependencies.csproj" />
<DisabledProjects Include="GC\Performance\Framework\GCPerfTestFramework.csproj" />
<DisabledProjects Include="Performance\Scenario\JitBench\unofficial_dotnet\JitBench.csproj" /> <!-- no official build support for SDK-style netcoreapp2.0 projects -->
<DisabledProjects Include="Loader\classloader\generics\regressions\DD117522\Test.csproj" />
<DisabledProjects Include="Loader\classloader\generics\GenericMethods\VSW491668.csproj" /> <!-- issue 5501 -->
<DisabledProjects Include="reflection\GenericAttribute\GenericAttributeTests.csproj" />
<DisabledProjects Include="Common\ilasm\ilasm.ilproj" />
<DisabledProjects Include="$(TestRoot)TestWrappers*\**\*.csproj" />
<DisabledProjects Include="$(TestRoot)*\**\cs_template.csproj" />
<DisabledProjects Include="$(TestRoot)Common\Coreclr.TestWrapper\Coreclr.TestWrapper.csproj" />
<DisabledProjects Include="$(TestRoot)Common\test_dependencies\test_dependencies.csproj" />
<DisabledProjects Include="$(TestRoot)Common\CoreFX\TestFileSetup\CoreFX.TestUtils.TestFileSetup.csproj" />
<DisabledProjects Include="$(TestRoot)Common\PerfHarness\PerfHarness.csproj" />
<DisabledProjects Include="$(TestRoot)Common\stress_dependencies\stress_dependencies.csproj" />
<DisabledProjects Include="$(TestRoot)GC\Performance\Framework\GCPerfTestFramework.csproj" />
<DisabledProjects Include="$(TestRoot)Performance\Scenario\JitBench\unofficial_dotnet\JitBench.csproj" /> <!-- no official build support for SDK-style netcoreapp2.0 projects -->
<DisabledProjects Include="$(TestRoot)Loader\classloader\generics\regressions\DD117522\Test.csproj" />
<DisabledProjects Include="$(TestRoot)Loader\classloader\generics\GenericMethods\VSW491668.csproj" /> <!-- issue 5501 -->
<DisabledProjects Include="$(TestRoot)reflection\GenericAttribute\GenericAttributeTests.csproj" />
<DisabledProjects Include="$(TestRoot)Common\ilasm\ilasm.ilproj" />
</ItemGroup>

<ItemGroup>
<AllProjects Include="*\**\*.csproj" Exclude="@(DisabledProjects)" />
<AllProjects Include="*\**\*.ilproj" Exclude="@(DisabledProjects)" />
<AllProjects Include="$(TestRoot)**\*.csproj" Exclude="@(DisabledProjects)" />
<AllProjects Include="$(TestRoot)**\*.ilproj" Exclude="@(DisabledProjects)" />
</ItemGroup>

<!-- All the test projects are partitioned into the test groups as defined below.
Expand Down Expand Up @@ -53,39 +57,39 @@
<GroupNumber>1</GroupNumber>
</_GroupStartsWith> -->

<_GroupStartsWith Include="JIT\CodeGenBringUpTests\DblNeg_ro.csproj">
<_GroupStartsWith Include="$(TestRoot)JIT\CodeGenBringUpTests\DblNeg_ro.csproj">
<GroupNumber>2</GroupNumber>
</_GroupStartsWith>

<_GroupStartsWith Include="JIT\Directed\shift\uint32_d.csproj">
<_GroupStartsWith Include="$(TestRoot)JIT\Directed\shift\uint32_d.csproj">
<GroupNumber>3</GroupNumber>
</_GroupStartsWith>

<_GroupStartsWith Include="JIT\Methodical\AsgOp\r8\r8flat_cs_r.csproj">
<_GroupStartsWith Include="$(TestRoot)JIT\Methodical\AsgOp\r8\r8flat_cs_r.csproj">
<GroupNumber>4</GroupNumber>
</_GroupStartsWith>

<_GroupStartsWith Include="JIT\Methodical\eh\finallyexec\tryCatchFinallyThrow_nonlocalexit4_ro.csproj">
<_GroupStartsWith Include="$(TestRoot)JIT\Methodical\eh\finallyexec\tryCatchFinallyThrow_nonlocalexit4_ro.csproj">
<GroupNumber>5</GroupNumber>
</_GroupStartsWith>

<_GroupStartsWith Include="JIT\Regression\CLR-x86-JIT\V1-M09.5-PDC\b25701\b25701.ilproj">
<_GroupStartsWith Include="$(TestRoot)JIT\Regression\CLR-x86-JIT\V1-M09.5-PDC\b25701\b25701.ilproj">
<GroupNumber>6</GroupNumber>
</_GroupStartsWith>

<_GroupStartsWith Include="JIT\Regression\JitBlue\GitHub_19171\GitHub_19171.csproj">
<_GroupStartsWith Include="$(TestRoot)JIT\Regression\JitBlue\GitHub_19171\GitHub_19171.csproj">
<GroupNumber>7</GroupNumber>
</_GroupStartsWith>

<_GroupStartsWith Include="JIT\jit64\valuetypes\nullable\box-unbox\value\box-unbox-value030.csproj">
<_GroupStartsWith Include="$(TestRoot)JIT\jit64\valuetypes\nullable\box-unbox\value\box-unbox-value030.csproj">
<GroupNumber>8</GroupNumber>
</_GroupStartsWith>

<_GroupStartsWith Include="Loader\classloader\TypeGeneratorTests\TypeGeneratorTest225\Generated225.ilproj">
<_GroupStartsWith Include="$(TestRoot)Loader\classloader\TypeGeneratorTests\TypeGeneratorTest225\Generated225.ilproj">
<GroupNumber>9</GroupNumber>
</_GroupStartsWith>

<_GroupStartsWith Include="Loader\classloader\generics\VSD\Class2_ImplicitOverrideVirtualNewslot.csproj">
<_GroupStartsWith Include="$(TestRoot)Loader\classloader\generics\VSD\Class2_ImplicitOverrideVirtualNewslot.csproj">
<GroupNumber>10</GroupNumber>
</_GroupStartsWith>
</ItemGroup>
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion src/coreclr/tests/src/runtest.proj
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ $(_XunitEpilog)
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(TestSourceDir)Common\Coreclr.TestWrapper\Coreclr.TestWrapper.csproj" />
<ProjectReference Include="$(RepoRoot)\src\coreclr\tests\src\Common\Coreclr.TestWrapper\Coreclr.TestWrapper.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions src/coreclr/tests/CMakeLists.txt → src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ project(Tests)

include(${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake)

set(INC_PLATFORM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/Common/Platform)
# Add this subdir. We install the headers for the jit.
add_subdirectory(../coreclr/src/pal/prebuilt/inc ../coreclr/src/pal/prebuilt/inc)

set(INC_PLATFORM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Common/Platform)
if (CLR_CMAKE_TARGET_WIN32)
add_definitions(-DWINDOWS)
endif()
Expand Down Expand Up @@ -52,4 +55,4 @@ MACRO(ADDSUBDIR_REC curdir)
ENDFOREACH()
ENDMACRO()

ADDSUBDIR_REC(${CMAKE_CURRENT_SOURCE_DIR})
ADDSUBDIR_REC("${CMAKE_CURRENT_SOURCE_DIR}")
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,4 @@
<Compile Include="XPlatformUtils.cs" />
</ItemGroup>

<!-- This project depends on properties pulled in by Directory.Build.targets in the test/src directory,
which isn't usually imported for the tests/src/Common
projects. -->
<Import Project="$(TestSourceDir)\Directory.Build.targets" />

</Project>
File renamed without changes.
4 changes: 4 additions & 0 deletions src/tests/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?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" />
</Project>
4 changes: 4 additions & 0 deletions src/tests/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?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.targets" />
</Project>
File renamed without changes.
Loading