Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-everything.proj
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TEST_CORECLR_FSHARP_SUITE)'=='1'" >
<ProjectsWithNet40 Include="tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj" />
<ProjectsWithCoreClr Include="tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj" />
</ItemGroup>

<ItemGroup Condition="'$(TEST_NET40_FSHARPQA_SUITE)'=='1' OR '$(TEST_NET40_FSHARP_SUITE)'=='1'" >
Expand Down
142 changes: 49 additions & 93 deletions build.cmd

Large diffs are not rendered by default.

22 changes: 19 additions & 3 deletions src/FSharpSource.targets
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<PortableNuGetMode>true</PortableNuGetMode>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='coreclr' AND '$(UnitTestAssembly)' == 'true' ">
<PropertyGroup Condition=" '$(TargetFramework)'=='coreclr' AND '$(DOTNET_PUBLISH_TEST)'=='true' ">
<OutputPath>bin\$(Configuration)\netcoreapp1.0</OutputPath>
<CustomOutputPath>true</CustomOutputPath>
<DOTNET_PUBLISH>true</DOTNET_PUBLISH>
Expand All @@ -179,6 +179,12 @@
<TargetExt>.dll</TargetExt>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='coreclr' AND '$(DOTNET_PUBLISH_COMPILERS)'=='true' ">
<DOTNET_PUBLISH_FSC>true</DOTNET_PUBLISH_FSC>
<DOTNET_PUBLISH_FSC_PATH>$(FSharpSourcesRoot)\..\tests\testbin\$(Configuration)\coreclr\FSC</DOTNET_PUBLISH_FSC_PATH>
<DOTNET_PUBLISH_FSI>true</DOTNET_PUBLISH_FSI>
<DOTNET_PUBLISH_FSI_PATH>$(FSharpSourcesRoot)\..\tests\testbin\$(Configuration)\coreclr\FSC</DOTNET_PUBLISH_FSI_PATH>
</PropertyGroup>

<!-- Target Portable Profile 47 -->
<PropertyGroup Condition="'$(TargetFramework)'=='portable47'">
Expand Down Expand Up @@ -478,14 +484,24 @@
<Exec Command='$(MSBuildThisFileDirectory)..\.nuget\nuget.exe pack %(PackageNuspec.Filename)%(PackageNuspec.Extension) -BasePath "$(OutputPath.TrimEnd("\"))" -ExcludeEmptyDirectories $(PackageProperties) -OutputDirectory "$(MSBuildThisFileDirectory)..\artifacts' />
</Target>

<Target Name="dotnetrestore" BeforeTargets="Build" Condition=" '$(TargetFramework)' == 'coreclr' and '$(DOTNET_PUBLISH)' == 'true' ">
<Target Name="dotnetrestore" BeforeTargets="Build" Condition=" '$(DOTNET_PUBLISH)' == 'true' ">
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe restore --configfile $(MSBuildThisFileDirectory)..\.nuget\NuGet.Config project.json"/>
</Target>

<Target Name="dotnetpublish" BeforeTargets="Build" Condition=" '$(TargetFramework)' == 'coreclr' and '$(DOTNET_PUBLISH)' == 'true' ">
<Target Name="dotnetpublish" AfterTargets="Build" Condition=" '$(DOTNET_PUBLISH)' == 'true' ">
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe publish --no-build project.json -r $(DOTNET_PUBLISH_PLATFORM) -c $(Configuration) -o $(DOTNET_PUBLISH_PATH)"/>
</Target>

<Target Name="dotnetpublishfsccompiler" AfterTargets="CopyFilesToOutputDirectory" Condition=" '$(DOTNET_PUBLISH_FSC)' == 'true' ">
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe restore DeployCompiler\fsc\project.json"/>
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe publish --no-build DeployCompiler\fsc\project.json -r $(DOTNET_PUBLISH_PLATFORM) -c $(Configuration) -o $(DOTNET_PUBLISH_FSC_PATH)"/>
</Target>

<Target Name="dotnetpublishfsicompiler" AfterTargets="CopyFilesToOutputDirectory" Condition=" '$(DOTNET_PUBLISH_FSI)' == 'true' ">
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe restore DeployCompiler\fsi\project.json"/>
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe publish --no-build DeployCompiler\fsi\project.json -r $(DOTNET_PUBLISH_PLATFORM) -c $(Configuration) -o $(DOTNET_PUBLISH_FSI_PATH)"/>
</Target>

<Target Name="GenerateSourceLink" BeforeTargets="CoreCompile" Condition="'$(UseSourceLink)' == 'true'">
<PropertyGroup>
<SrcRootDirectory>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory.TrimEnd("\"))))</SrcRootDirectory>
Expand Down
25 changes: 6 additions & 19 deletions src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<PropertyGroup>
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..</FSharpSourcesRoot>
<ProjectGuid>{88e2d422-6852-46e3-a740-83e391dc7973}</ProjectGuid>
<DOTNET_PUBLISH_TEST>true</DOTNET_PUBLISH_TEST>
<DOTNET_PUBLISH_COMPILERS>false</DOTNET_PUBLISH_COMPILERS>
</PropertyGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
<PropertyGroup>
Expand Down Expand Up @@ -66,21 +68,6 @@
<Private>True</Private>
</Reference>
</ItemGroup>
<!--
<ItemGroup Condition="'$(TargetFramework)' == 'coreclr'">
<Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb">
<SpecificVersion>true</SpecificVersion>
<Private>True</Private>
<HintPath>..\..\..\packages\NUnit.3.5.0\lib\portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="nunitlite, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb">
<SpecificVersion>true</SpecificVersion>
<Private>True</Private>
<HintPath>..\..\..\packages\NUnitLite.3.5.0\lib\portable-net45+win8+wp8+wpa81+Xamarin.Mac\nunitlite.dll</HintPath>
</Reference>
<None Include="project.json" />
</ItemGroup>
-->
<ItemGroup Condition="(!$(TargetFramework.Contains('portable'))) and '$(TargetFramework)' != 'coreclr'">
<Reference Include="mscorlib" />
<Reference Include="System" />
Expand Down Expand Up @@ -138,10 +125,10 @@
<Compile Include="SurfaceArea.$(TargetFramework).fs" />
<Compile Include="Program.fs" Condition="'$(TargetFramework)' == 'coreclr'" />
<CopyAndSubstituteText Include="FSharp.Core.Unittests.dll.config">
<TargetFilename>FSharp.Core.Unittests.dll.config</TargetFilename>
<Pattern1>FSCoreVersion</Pattern1>
<Replacement1>$(FSCoreVersion)</Replacement1>
</CopyAndSubstituteText>
<TargetFilename>FSharp.Core.Unittests.dll.config</TargetFilename>
<Pattern1>FSCoreVersion</Pattern1>
<Replacement1>$(FSCoreVersion)</Replacement1>
</CopyAndSubstituteText>
</ItemGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
</Project>
2 changes: 1 addition & 1 deletion src/fsharp/FSharp.Core/FSharp.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@

<!-- Hook compilation phase to do custom work -->

<Target Name="CopyToBuiltBin" BeforeTargets="BuiltProjectOutputGroup" AfterTargets="CoreCompile" >
<Target Name="CopyToBuiltBin" BeforeTargets="AfterCompile" AfterTargets="CoreCompile" >
<ItemGroup>
<BuiltProjectOutputGroupKeyOutput Include="$(IntermediateOutputPath)\FSharp.Core.sigdata" />
<BuiltProjectOutputGroupKeyOutput Include="$(IntermediateOutputPath)\FSharp.Core.optdata" />
Expand Down
12 changes: 6 additions & 6 deletions src/scripts/scriptlib.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module Scripting =
let getFullPath a = Path.GetFullPath a
let getFilename a = Path.GetFileName a
let getDirectoryName a = Path.GetDirectoryName a

let copyFile source dir =
let dest =
if not (Directory.Exists dir) then Directory.CreateDirectory dir |>ignore
Expand Down Expand Up @@ -132,7 +132,7 @@ module Scripting =
|> Option.iter (fun _ -> p.StartInfo.RedirectStandardInput <- true)

p.Start() |> ignore

cmdArgs.RedirectOutput |> Option.iter (fun _ -> p.BeginOutputReadLine())
cmdArgs.RedirectError |> Option.iter (fun _ -> p.BeginErrorReadLine())

Expand All @@ -158,19 +158,19 @@ module Scripting =
member x.Post (msg:string) = lock writer (fun () -> writer.WriteLine(msg))
interface System.IDisposable with
member __.Dispose() = writer.Flush()

let redirectTo (writer: TextWriter) = new OutPipe (writer)

let redirectToLog () = redirectTo System.Console.Out


#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
let defaultPlatform =
match Environment.OSVersion.Platform, Environment.Is64BitOperatingSystem with
| PlatformID.MacOSX, true -> "osx.10.10-x64"
| PlatformID.MacOSX, true -> "osx.10.11-x64"
| PlatformID.Unix,true -> "ubuntu.14.04-x64"
| _, true -> "win7-x64"
| _, false -> "win7-x86"

#endif

let executeProcessNoRedirect filename arguments =
let info = ProcessStartInfo(Arguments=arguments, UseShellExecute=false,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "1.0.0-*",
"name": "fsc",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.FSharp.Compiler.netcore": "1.0.0-alpha-*",
},
"runtimes": {
"win7-x86": { },
"win7-x64": { },
"osx.10.10-x64": { },
"ubuntu.14.04-x64": { }
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
}
},
"scripts": {
"postpublish": [ "cmd /c copy %publish:OutputPath%\\runtimes\\any\\native\\* %publish:OutputPath%" ]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "1.0.0-*",
"name": "fsi",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.FSharp.Compiler.netcore": "1.0.0-alpha-*",
},
"runtimes": {
"win7-x86": { },
"win7-x64": { },
"osx.10.10-x64": { },
"ubuntu.14.04-x64": { }
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
}
},
"scripts": {
"postpublish": [ "cmd /c copy %publish:OutputPath%\\runtimes\\any\\native\\* %publish:OutputPath%" ]
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\..\src</FSharpSourcesRoot>
<ProjectGuid>{bda4d411-6ad9-4b3e-a3b3-07bad6bef1ed}</ProjectGuid>
<DOTNET_PUBLISH_TEST>true</DOTNET_PUBLISH_TEST>
<DOTNET_PUBLISH_COMPILERS>true</DOTNET_PUBLISH_COMPILERS>
</PropertyGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
<PropertyGroup>
Expand All @@ -23,17 +25,18 @@
</PropertyGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
<ItemGroup>
<Compile Include="..\..\src\scripts\scriptlib.fsx">
<Compile Include="..\..\..\src\scripts\scriptlib.fsx">
<Link>scriptlib.fsx</Link>
</Compile>
<Compile Include="test-framework.fs" />
<Compile Include="..\..\src\fsharp\FSharp.Compiler.Unittests\NunitHelpers.fs">
<Compile Include="..\test-framework.fs" />
<Compile Include="..\..\..\src\fsharp\FSharp.Compiler.Unittests\NunitHelpers.fs">
<Link>NunitHelpers.fs</Link>
</Compile>
<Compile Include="single-test.fs" />
<Compile Include="tests.fs" />
<Compile Include="..\single-test.fs" />
<Compile Include="..\tests.fs" />
<Compile Include="Program.fs" Condition="'$(TargetFramework)' == 'coreclr'" />
</ItemGroup>
<ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'coreclr' ">
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.25928.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Tests.FSharpSuite.DrivingCoreCLR", "FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj", "{BDA4D411-6AD9-4B3E-A3B3-07BAD6BEF1ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Proto|Any CPU = Proto|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BDA4D411-6AD9-4B3E-A3B3-07BAD6BEF1ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BDA4D411-6AD9-4B3E-A3B3-07BAD6BEF1ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BDA4D411-6AD9-4B3E-A3B3-07BAD6BEF1ED}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
{BDA4D411-6AD9-4B3E-A3B3-07BAD6BEF1ED}.Proto|Any CPU.Build.0 = Proto|Any CPU
{BDA4D411-6AD9-4B3E-A3B3-07BAD6BEF1ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BDA4D411-6AD9-4B3E-A3B3-07BAD6BEF1ED}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// This file is only required for dotnet publish ... and it's not even really used by that.
12 changes: 12 additions & 0 deletions tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/Program.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module Program
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm we don't copyright the test files in the Cambridge suite. or at least not consistently. I wonder why.


open System
open System.Reflection
open NUnitLite
open NUnit.Common

type HelperType() = inherit System.Object()

[<EntryPoint>]
let main argv =
AutoRun(typeof<HelperType>.GetTypeInfo().Assembly).Execute(argv, new ExtendedTextWrapper(Console.Out), Console.In)
33 changes: 33 additions & 0 deletions tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"version": "1.0.0-*",
"name": "FSharp.Tests.FSharpSuite.DrivingCoreCLR",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"nunit": "3.5.0",
"nunitlite": "3.5.0",
"Microsoft.FSharp.Compiler.netcore": "1.0.0-alpha-*",
},
"runtimes": {
"win7-x86": {},
"win7-x64": {},
"osx.10.11-x64": {},
"ubuntu.14.04-x64": {}
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"imports": [ "netstandard1.1", "netstandard1.6", "portable-net45+win8+wp8+wpa81" ]
}
},
"scripts": {
"postpublish": [ "cmd /c copy %publish:OutputPath%\\runtimes\\any\\native\\* %publish:OutputPath%" ]
}
}
1 change: 1 addition & 0 deletions tests/fsharp/core/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
access/fsc.cmd.args

forwarders/orig
forwarders/split
Expand Down
Loading