Skip to content

Commit

Permalink
Add first fsharp test (dotnet#39871)
Browse files Browse the repository at this point in the history
* Add our first fsharp test

This will test some newly supported codepaths in .Net 5.0

* Working test

* Small change

* Addressed feedback and resolve fsharp dependencies

* Add a separate dependency to be restored and copied

* Fix typo
  • Loading branch information
Jarret Shook authored Jul 30, 2020
1 parent 278cc96 commit f880aad
Show file tree
Hide file tree
Showing 8 changed files with 609 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/coreclr/tests/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<ItemGroup>
<RestoreProjects Include="$(MSBuildThisFileDirectory)scripts\scripts.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\test_dependencies_fs\test_dependencies.fsproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\test_dependencies\test_dependencies.csproj" />
<RestoreProjects Include="$(RepoRoot)src\tests\Common\CoreCLRTestLibrary\CoreCLRTestLibrary.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)external\external.csproj" />
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/tests/publishdependency.targets
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +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="$(RepoRoot)src\coreclr\tests\src\Common\test_dependencies_fs\test_dependencies.fsproj" />
<CoreRootProjectFiles Include="$(RepoRoot)src\coreclr\tests\src\Common\test_dependencies\test_dependencies.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<CLRTestKind>BuildOnly</CLRTestKind>
<IsTestProject>false</IsTestProject>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<DisableRarCache>true</DisableRarCache>
<DisablePackageAssetsCache>true</DisablePackageAssetsCache>
<RuntimeIdentifiers>win-arm;win-arm64;win-x64;win-x86;$(TargetRid)</RuntimeIdentifiers>
<IncludeOOBLibraries>true</IncludeOOBLibraries>
<LibrariesConfiguration>Release</LibrariesConfiguration>
</PropertyGroup>

<Target Name="Build" DependsOnTargets="$(TraversalBuildDependsOn)" />

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

<Import Project="$(RepositoryEngineeringDir)liveBuilds.targets" />

<Target Name="AddLibrariesToCoreRootFS" BeforeTargets="AddLibrariesToCoreRoot" DependsOnTargets="ResolveLibrariesFromLocalBuild">
<ItemGroup>
<RuntimeCopyLocalItems Include="@(LibrariesRuntimeFiles)" />
</ItemGroup>
</Target>
</Project>
1 change: 1 addition & 0 deletions src/coreclr/tests/src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
<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>

Expand Down
1 change: 1 addition & 0 deletions src/coreclr/tests/src/dirs.proj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

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

Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/tests/src/runtest.proj
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
<MSBuild Projects="$(MSBuildThisFileDirectory)Common\test_dependencies\test_dependencies.csproj"
Condition=" '$(BuildWrappers)'=='true' " />

<MSBuild Projects="$(MSBuildThisFileDirectory)Common\test_dependencies_fs\test_dependencies.fsproj"
Condition=" '$(BuildWrappers)'=='true' " />

<MSBuild Projects="$(MSBuildProjectFile)"
Targets="MonoAotCompileTests"
Properties=""
Expand Down
Loading

0 comments on commit f880aad

Please sign in to comment.