diff --git a/build-everything.proj b/build-everything.proj
index 320a3fe1a7..373aea7269 100644
--- a/build-everything.proj
+++ b/build-everything.proj
@@ -62,7 +62,7 @@
-
+
diff --git a/build.cmd b/build.cmd
index 4cacde6232..fbff76a9bc 100644
--- a/build.cmd
+++ b/build.cmd
@@ -1,3 +1,4 @@
+rem Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
@if "%_echo%"=="" echo off
setlocal enableDelayedExpansion
@@ -102,6 +103,7 @@ if /i '%_autoselect_tests%' == '1' (
)
if /i '%BUILD_CORECLR%' == '1' (
+ set BUILD_NET40=1
set TEST_CORECLR_FSHARP_SUITE=1
set TEST_CORECLR_COREUNIT_SUITE=1
)
@@ -166,7 +168,7 @@ if /i '%ARG%' == 'microbuild' (
set _autoselect=0
set BUILD_PROTO=1
set BUILD_NET40=1
- set BUILD_CORECLR=0
+ set BUILD_CORECLR=1
set BUILD_PORTABLE=1
set BUILD_VS=1
set BUILD_SETUP=%FSC_BUILD_SETUP%
@@ -246,7 +248,6 @@ if /i '%ARG%' == 'include' (
if '!INCLUDE_TEST_TAGS!' == '' ( set INCLUDE_TEST_TAGS=%ARG2% ) else (set INCLUDE_TEST_TAGS=%ARG2%;!INCLUDE_TEST_TAGS! )
)
-
if /i '%ARG%' == 'test-all' (
set _autoselect=0
set BUILD_PROTO=1
@@ -282,20 +283,17 @@ if /i '%ARG%' == 'test-net40-coreunit' (
set TEST_NET40_COREUNIT_SUITE=1
)
-
if /i '%ARG%' == 'test-coreclr-coreunit' (
set BUILD_PROTO_WITH_CORECLR_LKG=1
set BUILD_CORECLR=1
set TEST_CORECLR_COREUNIT_SUITE=1
)
-
if /i '%ARG%' == 'test-pcl-coreunit' (
set BUILD_PORTABLE=1
set TEST_PORTABLE_COREUNIT_SUITE=1
)
-
if /i '%ARG%' == 'test-net40-fsharp' (
set BUILD_NET40=1
set BUILD_PORTABLE=1
@@ -346,7 +344,13 @@ echo TEST_VS_IDEUNIT_SUITE=%TEST_VS_IDEUNIT_SUITE%
echo INCLUDE_TEST_SPEC_NUNIT=%INCLUDE_TEST_SPEC_NUNIT%
echo INCLUDE_TEST_TAGS=%INCLUDE_TEST_TAGS%
-echo.
+
+echo .
+echo Environment
+echo
+set
+echo .
+echo .
echo ---------------- Done with arguments, starting preparation -----------------
if '%VSSDKInstall%'=='' (
@@ -535,51 +539,42 @@ if not exist %NUNITPATH% echo Error: Could not find %NUNITPATH% && goto :failure
@echo xcopy "%~dp0tests\fsharpqa\testenv\src\nunit*.*" "%~dp0tests\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
xcopy "%~dp0tests\fsharpqa\testenv\src\nunit*.*" "%~dp0tests\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
+set X86_PROGRAMFILES=%ProgramFiles%
+if "%OSARCH%"=="AMD64" set X86_PROGRAMFILES=%ProgramFiles(x86)%
+
+set SYSWOW64=.
+if "%OSARCH%"=="AMD64" set SYSWOW64=SysWoW64
-if '%BUILD_CORECLR%' == '1' (
- echo Restoring CoreCLR packages and runtimes necessary for actually running and testing
- echo %_nugetexe% restore .\tests\fsharp\project.json -PackagesDirectory packages -ConfigFile %_nugetconfig%
- %_nugetexe% restore .\tests\fsharp\project.json -PackagesDirectory packages -ConfigFile %_nugetconfig%
- if ERRORLEVEL 1 ( goto :failure )
-
- echo Deploy x86 version of compiler and dependencies, ready for testing
- echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x86 --copyCompiler:yes --v:quiet
- %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x86 --copyCompiler:yes --v:quiet
- if ERRORLEVEL 1 ( goto :failure )
- echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x86 --copyCompiler:no --v:quiet
- %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x86 --copyCompiler:no --v:quiet
- if ERRORLEVEL 1 ( goto :failure )
-
- echo Deploy x64 compiler to tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x64, ready for testing
- echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x64 --copyCompiler:yes --v:quiet
- %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x64 --copyCompiler:yes --v:quiet
- if ERRORLEVEL 1 ( goto :failure )
-
- echo Deploy x64 runtime and FSharp.Core library to tests\testbin\%BUILD_CONFIG%\coreclr\win7-x64, ready for testing
- echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x64 --copyCompiler:no --v:quiet
- %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x64 --copyCompiler:no --v:quiet
- if ERRORLEVEL 1 ( goto :failure )
-
- echo Deploy linux compiler to tests\testbin\%BUILD_CONFIG%\coreclr\fsc\ubuntu.14.04-x64, ready for testing
- echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\ubuntu.14.04-x64 --copyCompiler:yes --v:quiet
- %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\ubuntu.14.04-x64 --copyCompiler:yes --v:quiet
- if ERRORLEVEL 1 ( goto :failure )
-
- echo Deploy linux runtime and FSharp.Core library to tests\testbin\%BUILD_CONFIG%\coreclr\ubuntu.14.04-x64, ready for testing
- echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\ubuntu.14.04-x64 --copyCompiler:no --v:quiet
- %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\ubuntu.14.04-x64 --copyCompiler:no --v:quiet
- if ERRORLEVEL 1 ( goto :failure )
-
- echo Deploy OSX compiler to tests\testbin\%BUILD_CONFIG%\coreclr\fsc\osx.10.10-x64, ready for testing
- echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\osx.10.10-x64 --copyCompiler:yes --v:quiet
- %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\osx.10.10-x64 --copyCompiler:yes --v:quiet
- if ERRORLEVEL 1 ( goto :failure )
-
- echo Deploy OSX runtime and FSharp.Core library to tests\testbin\%BUILD_CONFIG%\coreclr\osx.10.10-x64, ready for testing
- echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\osx.10.10-x64 --copyCompiler:no --v:quiet
- %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\osx.10.10-x64 --copyCompiler:no --v:quiet
- if ERRORLEVEL 1 ( goto :failure )
-)
+if not "%OSARCH%"=="x86" set REGEXE32BIT=%WINDIR%\syswow64\reg.exe
+
+echo SDK environment vars from Registry
+ FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\WOW6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.2\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
+if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\WOW6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
+if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
+if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
+if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
+if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
+if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
+
+set PATH=%PATH%;%WINSDKNETFXTOOLS%
+for /d %%i in (%WINDIR%\Microsoft.NET\Framework\v4.0.?????) do set CORDIR=%%i
+set PATH=%PATH%;%CORDIR%
+
+set REGEXE32BIT=reg.exe
+
+IF NOT DEFINED SNEXE32 IF EXIST "%WINSDKNETFXTOOLS%\sn.exe" set SNEXE32=%WINSDKNETFXTOOLS%sn.exe
+IF NOT DEFINED SNEXE64 IF EXIST "%WINSDKNETFXTOOLS%x64\sn.exe" set SNEXE64=%WINSDKNETFXTOOLS%x64\sn.exe
+IF NOT DEFINED ildasm IF EXIST "%WINSDKNETFXTOOLS%\ildasm.exe" set ildasm=%WINSDKNETFXTOOLS%ildasm.exe
+
+
+echo .
+echo SDK environment vars
+echo =======================
+echo WINSDKNETFXTOOLS: %WINSDKNETFXTOOLS%
+echo SNEXE32: %SNEXE32%
+echo SNEXE64: %SNEXE64%
+echo ILDASM: %ILDASM%
+echo
if 'TEST_NET40_COMPILERUNIT_SUITE' == '0' and 'TEST_PORTABLE_COREUNIT_SUITE' == '0' and 'TEST_CORECLR_COREUNIT_SUITE' == '0' and 'TEST_VS_IDEUNIT_SUITE' == '0' and 'TEST_NET40_FSHARP_SUITE' == '0' and 'TEST_NET40_FSHARPQA_SUITE' == '0' goto :success
@@ -654,33 +649,6 @@ rem This only has an effect when running the FSHARPQA tests, but can
rem greatly speed up execution since fsc.exe does not need to be spawned thousands of times
set HOSTED_COMPILER=1
-set X86_PROGRAMFILES=%ProgramFiles%
-if "%OSARCH%"=="AMD64" set X86_PROGRAMFILES=%ProgramFiles(x86)%
-
-set SYSWOW64=.
-if "%OSARCH%"=="AMD64" set SYSWOW64=SysWoW64
-
-if not "%OSARCH%"=="x86" set REGEXE32BIT=%WINDIR%\syswow64\reg.exe
-
- FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\WOW6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.2\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
-if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\WOW6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
-if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
-if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
-if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
-if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
-if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS=%%B
-
-set PATH=%PATH%;%WINSDKNETFXTOOLS%
-for /d %%i in (%WINDIR%\Microsoft.NET\Framework\v4.0.?????) do set CORDIR=%%i
-set PATH=%PATH%;%CORDIR%
-
-set REGEXE32BIT=reg.exe
-
-IF NOT DEFINED SNEXE32 IF EXIST "%WINSDKNETFXTOOLS%\sn.exe" set SNEXE32=%WINSDKNETFXTOOLS%sn.exe
-IF NOT DEFINED SNEXE64 IF EXIST "%WINSDKNETFXTOOLS%x64\sn.exe" set SNEXE64=%WINSDKNETFXTOOLS%x64\sn.exe
-IF NOT DEFINED ildasm IF EXIST "%WINSDKNETFXTOOLS%\ildasm.exe" set ildasm=%WINSDKNETFXTOOLS%ildasm.exe
-
-
if '%TEST_NET40_FSHARPQA_SUITE%' == '1' (
set FSC=!FSCBINPATH!\fsc.exe
@@ -831,7 +799,6 @@ if '%TEST_CORECLR_COREUNIT_SUITE%' == '1' (
REM ---------------- coreclr-fsharp -----------------------
-
if '%TEST_CORECLR_FSHARP_SUITE%' == '1' (
set single_threaded=true
@@ -842,26 +809,15 @@ if '%TEST_CORECLR_FSHARP_SUITE%' == '1' (
set OUTPUTFILE=
set ERRORFILE=
set XMLFILE=!RESULTSDIR!\test-coreclr-fsharp-results.xml
- if '%CI%' == '1' (
- set OUTPUTFILE=!RESULTSDIR!\test-coreclr-fsharp-output.log
- set ERRORFILE=!RESULTSDIR!\test-coreclr-fsharp-errors.log
- set ERRORARG=--err:"!ERRORFILE!"
- set OUTPUTARG=--output:"!OUTPUTFILE!"
- )
+ echo "%_dotnetexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT!
+ "%_dotnetexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Tests.FSharpSuite.DrivingCoreCLR\FSharp.Tests.FSharpSuite.DrivingCoreCLR.dll" !WHERE_ARG_NUNIT!
+
- echo "!NUNIT3_CONSOLE!" --verbose "!FSCBINPATH!\FSharp.Tests.FSharpSuite.DrivingCoreCLR.dll" --framework:V4.0 --work:"!FSCBINPATH!" !OUTPUTARG! !ERRORARG! --result:"!XMLFILE!;format=nunit3" !WHERE_ARG_NUNIT!
- "!NUNIT3_CONSOLE!" --verbose "!FSCBINPATH!\FSharp.Tests.FSharpSuite.DrivingCoreCLR.dll" --framework:V4.0 --work:"!FSCBINPATH!" !OUTPUTARG! !ERRORARG! --result:"!XMLFILE!;format=nunit3" !WHERE_ARG_NUNIT!
call :UPLOAD_TEST_RESULTS "!XMLFILE!" "!OUTPUTFILE!" "!ERRORFILE!"
if NOT '!saved_errorlevel!' == '0' (
- echo --------------begin coreclr-fsharp test output -------------------
- type "!OUTPUTFILE!"
- echo --------------end coreclr-fsharp test output -------------------
- echo --------------begin coreclr-fsharp test errors -------------------
- type "!ERRORFILE!"
- echo --------------end coreclr-fsharp test errors -------------------
echo -----------------------------------------------------------------
- echo Error: Running tests coreclr-fsharp failed , see logs abvoe -- FAILED
+ echo Error: Running tests coreclr-fsharp failed, see logs above-- FAILED
echo -----------------------------------------------------------------
goto :failure
)
diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets
index 8aecf762b9..82712c85d6 100644
--- a/src/FSharpSource.targets
+++ b/src/FSharpSource.targets
@@ -169,7 +169,7 @@
true
-
+
bin\$(Configuration)\netcoreapp1.0
true
true
@@ -179,6 +179,12 @@
.dll
+
+ true
+ $(FSharpSourcesRoot)\..\tests\testbin\$(Configuration)\coreclr\FSC
+ true
+ $(FSharpSourcesRoot)\..\tests\testbin\$(Configuration)\coreclr\FSC
+
@@ -478,14 +484,24 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory.TrimEnd("\"))))
diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj b/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
index 1636699894..278c681eb3 100644
--- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
+++ b/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
@@ -4,6 +4,8 @@
$(MSBuildProjectDirectory)\..\..
{88e2d422-6852-46e3-a740-83e391dc7973}
+ true
+ false
@@ -66,21 +68,6 @@
True
-
@@ -138,10 +125,10 @@
- FSharp.Core.Unittests.dll.config
- FSCoreVersion
- $(FSCoreVersion)
-
+ FSharp.Core.Unittests.dll.config
+ FSCoreVersion
+ $(FSCoreVersion)
+
diff --git a/src/fsharp/FSharp.Core/FSharp.Core.fsproj b/src/fsharp/FSharp.Core/FSharp.Core.fsproj
index 1909f2ddfb..545c1e3fa5 100644
--- a/src/fsharp/FSharp.Core/FSharp.Core.fsproj
+++ b/src/fsharp/FSharp.Core/FSharp.Core.fsproj
@@ -232,7 +232,7 @@
-
+
diff --git a/src/scripts/scriptlib.fsx b/src/scripts/scriptlib.fsx
index db1c32c3ed..f8f2dc14bd 100644
--- a/src/scripts/scriptlib.fsx
+++ b/src/scripts/scriptlib.fsx
@@ -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
@@ -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())
@@ -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,
diff --git a/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/DeployCompiler/fsc/project.json b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/DeployCompiler/fsc/project.json
new file mode 100644
index 0000000000..0c7d016d93
--- /dev/null
+++ b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/DeployCompiler/fsc/project.json
@@ -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%" ]
+ }
+}
\ No newline at end of file
diff --git a/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/DeployCompiler/fsi/project.json b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/DeployCompiler/fsi/project.json
new file mode 100644
index 0000000000..258bd14a71
--- /dev/null
+++ b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/DeployCompiler/fsi/project.json
@@ -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%" ]
+ }
+}
\ No newline at end of file
diff --git a/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj
similarity index 77%
rename from tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj
rename to tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj
index 60c1b7298b..3a88453665 100644
--- a/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj
+++ b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj
@@ -1,8 +1,10 @@
- $(MSBuildProjectDirectory)\..\..\src
+ $(MSBuildProjectDirectory)\..\..\..\src
{bda4d411-6ad9-4b3e-a3b3-07bad6bef1ed}
+ true
+ true
@@ -23,17 +25,18 @@
-
+
scriptlib.fsx
-
-
+
+
NunitHelpers.fs
-
-
+
+
+
-
+
diff --git a/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.sln b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.sln
new file mode 100644
index 0000000000..69d9198aba
--- /dev/null
+++ b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.sln
@@ -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
diff --git a/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/Program.cs b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/Program.cs
new file mode 100644
index 0000000000..5183e98a29
--- /dev/null
+++ b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/Program.cs
@@ -0,0 +1 @@
+// This file is only required for dotnet publish ... and it's not even really used by that.
diff --git a/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/Program.fs b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/Program.fs
new file mode 100644
index 0000000000..28ff2aa843
--- /dev/null
+++ b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/Program.fs
@@ -0,0 +1,12 @@
+module Program
+
+open System
+open System.Reflection
+open NUnitLite
+open NUnit.Common
+
+type HelperType() = inherit System.Object()
+
+[]
+let main argv =
+ AutoRun(typeof.GetTypeInfo().Assembly).Execute(argv, new ExtendedTextWrapper(Console.Out), Console.In)
diff --git a/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/project.json b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/project.json
new file mode 100644
index 0000000000..f4f12840eb
--- /dev/null
+++ b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/project.json
@@ -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%" ]
+ }
+}
diff --git a/tests/fsharp/core/.gitignore b/tests/fsharp/core/.gitignore
index 71c2b74eda..ad7afd3e36 100644
--- a/tests/fsharp/core/.gitignore
+++ b/tests/fsharp/core/.gitignore
@@ -1,3 +1,4 @@
+access/fsc.cmd.args
forwarders/orig
forwarders/split
diff --git a/tests/fsharp/project.json b/tests/fsharp/project.json
deleted file mode 100644
index 73636f44f5..0000000000
--- a/tests/fsharp/project.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "dependencies": {
- "Microsoft.NETCore.Platforms": "1.0.1",
- "NETStandard.Library": "1.6.0",
- "System.Collections": "4.0.11",
- "System.Collections.Immutable": "1.2.0",
- "System.Console": "4.0.0",
- "System.Diagnostics.Debug": "4.0.11",
- "System.Diagnostics.Process": "4.1.0",
- "System.Diagnostics.Tools": "4.0.1",
- "System.Diagnostics.TraceSource": "4.0.0",
- "System.Globalization": "4.0.11",
- "System.IO": "4.1.0",
- "System.IO.FileSystem": "4.0.1",
- "System.Linq": "4.1.0",
- "System.Linq.Expressions": "4.1.0",
- "System.Linq.Queryable": "4.0.1",
- "System.Net.Requests": "4.0.11",
- "System.Reflection": "4.1.0",
- "System.Reflection.Emit": "4.0.1",
- "System.Reflection.Extensions": "4.0.1",
- "System.Reflection.Metadata": "1.4.1-beta-24227-04",
- "System.Reflection.TypeExtensions": "4.1.0",
- "System.Runtime": "4.1.0",
- "System.Runtime.Extensions": "4.1.0",
- "System.Runtime.InteropServices": "4.1.0",
- "System.Runtime.Loader": "4.0.0",
- "System.Runtime.Numerics": "4.0.1",
- "System.Security.Cryptography.Algorithms": "4.2.0",
- "System.Text.RegularExpressions": "4.1.0",
- "System.Threading": "4.0.11",
- "System.Threading.Tasks": "4.0.11",
- "System.Threading.Tasks.Parallel": "4.0.1",
- "System.Threading.Thread": "4.0.0",
- "System.Threading.ThreadPool": "4.0.10",
- "System.Threading.Timer": "4.0.1",
- "System.ValueTuple": "4.0.0-rc3-24212-01",
-
- "Microsoft.DiaSymReader.PortablePdb": "1.1.0",
- "Microsoft.DiaSymReader": "1.0.8",
-
- "Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
- "Microsoft.NETCore.TestHost": "1.0.0",
- "System.Reflection.Emit.ILGeneration": "4.0.1",
- "System.Security.Cryptography.Primitives": "4.0.0"
- },
- "runtimes": {
- "win7-x86": { },
- "win7-x64": { },
- "osx.10.10-x64": { },
- "ubuntu.14.04-x64": { }
- },
- "frameworks": {
- "netstandard1.6": {},
- "netcoreapp1.0": {
- "dependencies": {
- "Microsoft.NETCore.App": {
- "type": "platform",
- "version": "1.0.1"
- }
- },
- "imports": [ "netstandard1.1", "netstandard1.6", "portable-net45+win8+wp8+wpa81" ]
- }
- }
-}
diff --git a/tests/fsharp/single-test.fs b/tests/fsharp/single-test.fs
index 8f4cb649d4..dd4b42e0a4 100644
--- a/tests/fsharp/single-test.fs
+++ b/tests/fsharp/single-test.fs
@@ -27,13 +27,13 @@ let singleTestBuildAndRunAux cfg p =
["testlib.fsi";"testlib.fs";"test.mli";"test.ml";"test.fsi";"test.fs";"test2.fsi";"test2.fs";"test.fsx";"test2.fsx"]
|> List.filter (fileExists cfg)
-
match p with
| FSC_CORECLR ->
let testName = getBasename cfg.Directory
let extraSource = (__SOURCE_DIRECTORY__ ++ "coreclr_utilities.fs")
- let outFile = (__SOURCE_DIRECTORY__ ++ sprintf @"../testbin/%s/coreclr/fsharp/core/%s/output/test.exe" cfg.BUILD_CONFIG testName)
- let coreRunExe = (__SOURCE_DIRECTORY__ ++ sprintf @"../testbin/%s/coreclr/%s/corerun.exe" cfg.BUILD_CONFIG defaultPlatform)
+ let outDir = (__SOURCE_DIRECTORY__ ++ sprintf @"../testbin/%s/coreclr/fsharp/core/%s" cfg.BUILD_CONFIG testName)
+ let outFile = (__SOURCE_DIRECTORY__ ++ sprintf @"../testbin/%s/coreclr/fsharp/core/%s/test.exe" cfg.BUILD_CONFIG testName)
+
makeDirectory (getDirectoryName outFile)
let fscArgs =
sprintf """--debug:portable --debug+ --out:%s --target:exe -g --define:FX_RESHAPED_REFLECTION --define:NETSTANDARD1_6 --define:FSCORE_PORTABLE_NEW --define:FX_PORTABLE_OR_NETSTANDARD "%s" %s """
@@ -41,16 +41,16 @@ let singleTestBuildAndRunAux cfg p =
extraSource
(String.concat " " sources)
- let fsccArgs = sprintf """--verbose:repro %s""" fscArgs
+ let fsccArgs = sprintf """--OutputDir:%s %s""" outDir fscArgs
fsi cfg "--exec %s %s %s"
cfg.fsi_flags
(__SOURCE_DIRECTORY__ ++ @"../scripts/fscc.fsx")
fsccArgs
[]
-
+
use testOkFile = new FileGuard (getfullpath cfg "test.ok")
- exec cfg coreRunExe outFile
+ exec cfg cfg.DotNetExe outFile
testOkFile.CheckExists()
@@ -70,7 +70,7 @@ let singleTestBuildAndRunAux cfg p =
(__SOURCE_DIRECTORY__ ++ @"../scripts/fsci.fsx")
fsciArgs
[]
-
+
testOkFile.CheckExists()
#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
diff --git a/tests/fsharp/test-framework.fs b/tests/fsharp/test-framework.fs
index de0756a219..f18bcc14ab 100644
--- a/tests/fsharp/test-framework.fs
+++ b/tests/fsharp/test-framework.fs
@@ -111,27 +111,21 @@ type TestConfig =
SN : string
NGEN : string
PEVERIFY : string
- Directory: string }
+ Directory: string
+ DotNetExe: string
+ DefaultPlatform: string}
module WindowsPlatform =
- let clrPaths envVars =
+ let Is64BitOperatingSystem envVars =
+ // On Windows PROCESSOR_ARCHITECTURE has the value AMD64 on 64 bit Intel Machines
+ let value =
+ let find s = envVars |> Map.tryFind s
+ [| "PROCESSOR_ARCHITECTURE" |] |> Seq.tryPick (fun s -> find s) |> function None -> "" | Some x -> x
+ value = "AMD64"
- let regQuery path value (baseKey: RegistryKey) =
- use regKey = baseKey.OpenSubKey(path, false)
-
- if (regKey = null) then None
- else
- match regKey.GetValue(value) with
- | null -> None
- | x -> Some x
-
- let regQueryREG_SOFTWARE path value =
- let hklm32 = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32)
- match hklm32 |> regQuery path value with
- | Some (:? string as d) -> Some d
- | Some _ | None -> None
+ let clrPaths envVars =
let windir =
match envVars |> Map.tryFind "windir" with
@@ -145,22 +139,12 @@ module WindowsPlatform =
// == Use the same runtime as our architecture
// == ASSUMPTION: This could be a good or bad thing.
- if Environment.Is64BitOperatingSystem then
+ if Is64BitOperatingSystem envVars then
CORDIR <- CORDIR.Replace("Framework", "Framework64")
- let allSDK =
- [ regQueryREG_SOFTWARE @"Software\WOW6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.2\WinSDK-NetFx40Tools" "InstallationFolder"
- regQueryREG_SOFTWARE @"Software\WOW6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1\WinSDK-NetFx40Tools" "InstallationFolder"
- regQueryREG_SOFTWARE @"Software\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools" "InstallationFolder"
- regQueryREG_SOFTWARE @"Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools" "InstallationFolder"
- regQueryREG_SOFTWARE @"Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools" "InstallationFolder"
- regQueryREG_SOFTWARE @"Software\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDK-NetFx40Tools" "InstallationFolder"
- regQueryREG_SOFTWARE @"Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools" "InstallationFolder" ]
-
- let mutable CORSDK = allSDK |> Seq.tryPick id |> function None -> failwith "couldn't find CORSDK" | Some d -> d
-
- if Environment.Is64BitOperatingSystem then
- CORSDK <- CORSDK ++ "x64"
+ let CORSDK =
+ let find s = envVars |> Map.tryFind s
+ [| "WINSDKNETFXTOOLS"; "WindowsSDK_ExecutablePath_x64"; "WindowsSDK_ExecutablePath_x86" |] |> Seq.tryPick (fun s -> find s) |> function None -> "" | Some x -> x
CORDIR, CORSDK
@@ -180,8 +164,10 @@ let config configurationName envVars =
let fsi_flags = "-r:System.Core.dll --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror"
let CORDIR, CORSDK = WindowsPlatform.clrPaths envVars
-
- let fsiroot = if Environment.Is64BitOperatingSystem then "fsiAnyCpu" else "fsi"
+
+ let Is64BitOperatingSystem = WindowsPlatform.Is64BitOperatingSystem envVars
+
+ let fsiroot = if Is64BitOperatingSystem then "fsiAnyCpu" else "fsi"
let CSC = requireFile (CORDIR ++ "csc.exe")
let NGEN = requireFile (CORDIR ++ "ngen.exe")
@@ -192,6 +178,16 @@ let config configurationName envVars =
let FSI = requireFile (FSCBinPath ++ (fsiroot+".exe"))
let FSCOREDLLPATH = requireFile (FSCBinPath ++ "FSharp.Core.dll")
+ let defaultPlatform =
+ match Is64BitOperatingSystem with
+// | PlatformID.MacOSX, true -> "osx.10.10-x64"
+// | PlatformID.Unix,true -> "ubuntu.14.04-x64"
+ | true -> "win7-x64"
+ | false -> "win7-x86"
+
+
+ let dotNetExe = SCRIPT_ROOT ++ ".." ++ ".." ++ "Tools" ++ "dotnetcli" ++ "dotnet.exe"
+
{ EnvironmentVariables = envVars
CORDIR = CORDIR |> Commands.pathAddBackslash
CORSDK = CORSDK |> Commands.pathAddBackslash
@@ -208,8 +204,10 @@ let config configurationName envVars =
csc_flags = csc_flags
fsc_flags = fsc_flags
fsi_flags = fsi_flags
- Directory="" }
-
+ Directory=""
+ DotNetExe = dotNetExe
+ DefaultPlatform = defaultPlatform }
+
let logConfig (cfg: TestConfig) =
log "---------------------------------------------------------------"
log "Executables"
@@ -421,7 +419,6 @@ let execAppendOutIgnoreExitCode cfg workDir outFile p = Command.exec workDir cf
let execAppendErrExpectFail cfg errPath p = Command.exec cfg.Directory cfg.EnvironmentVariables { execArgs with Output = Error(Overwrite(errPath)) } p >> checkErrorLevel1
let execStdin cfg l p = Command.exec cfg.Directory cfg.EnvironmentVariables { Output = Inherit; Input = Some(RedirectInput(l)) } p >> checkResult
let execStdinAppendBothIgnoreExitCode cfg stdoutPath stderrPath stdinPath p = Command.exec cfg.Directory cfg.EnvironmentVariables { Output = OutputAndError(Append(stdoutPath), Append(stderrPath)); Input = Some(RedirectInput(stdinPath)) } p >> alwaysSuccess
-
let fsc cfg arg = Printf.ksprintf (Commands.fsc cfg.Directory (exec cfg) cfg.FSC) arg
let fscIn cfg workDir arg = Printf.ksprintf (Commands.fsc workDir (execIn cfg workDir) cfg.FSC) arg
let fscAppend cfg stdoutPath stderrPath arg = Printf.ksprintf (Commands.fsc cfg.Directory (execAppend cfg stdoutPath stderrPath) cfg.FSC) arg
@@ -449,7 +446,7 @@ let copy_y cfg f = Commands.copy_y cfg.Directory f >> checkResult
let diff normalize path1 path2 =
let result = System.Text.StringBuilder()
let append s = result.AppendLine s |> ignore
- let cwd = Environment.CurrentDirectory
+ let cwd = Directory.GetCurrentDirectory()
if not <| File.Exists(path1) then failwithf "Invalid path %s" path1
if not <| File.Exists(path2) then failwithf "Invalid path %s" path2
diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs
index 669024271e..f03632ef36 100644
--- a/tests/fsharp/tests.fs
+++ b/tests/fsharp/tests.fs
@@ -37,40 +37,40 @@ module CoreTests =
#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``access-FSI_BASIC``() = singleTestBuildAndRun "core/access" FSI_BASIC
-
+#endif
[]
let ``apporder-FSC_BASIC`` () = singleTestBuildAndRun "core/apporder" FSC_BASIC
-
+#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``apporder-FSI_BASIC`` () = singleTestBuildAndRun "core/apporder" FSI_BASIC
-
+#endif
[]
let ``array-FSC_BASIC`` () = singleTestBuildAndRun "core/array" FSC_BASIC
-
+#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``array-FSI_BASIC`` () = singleTestBuildAndRun "core/array" FSI_BASIC
-
+#endif
[]
let ``comprehensions-FSC_BASIC`` () = singleTestBuildAndRun "core/comprehensions" FSC_BASIC
-
+#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``comprehensions-FSI_BASIC`` () = singleTestBuildAndRun "core/comprehensions" FSI_BASIC
-
+#endif
[]
let ``comprehensionshw-FSC_BASIC`` () = singleTestBuildAndRun "core/comprehensions-hw" FSC_BASIC
-
+#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``comprehensionshw-FSI_BASIC`` () = singleTestBuildAndRun "core/comprehensions-hw" FSI_BASIC
[]
let ``genericmeasures-FSI_BASIC`` () = singleTestBuildAndRun "core/genericmeasures" FSI_BASIC
-
+#endif
[]
let ``genericmeasures-FSC_BASIC`` () = singleTestBuildAndRun "core/genericmeasures" FSC_BASIC
-
+#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``innerpoly-FSI_BASIC`` () = singleTestBuildAndRun "core/innerpoly" FSI_BASIC
-
+#endif
[]
let ``innerpoly-FSC_BASIC`` () = singleTestBuildAndRun "core/innerpoly" FSC_BASIC
@@ -79,28 +79,28 @@ module CoreTests =
[]
let unicode2 () = singleTestBuildAndRun "core/unicode" FSC_BASIC
-
+#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``unicode2-FSI_BASIC`` () = singleTestBuildAndRun "core/unicode" FSI_BASIC
-
+#endif
[]
let ``lazy test-FSC_BASIC`` () = singleTestBuildAndRun "core/lazy" FSC_BASIC
-
+#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``lazy test-FSI_BASIC`` () = singleTestBuildAndRun "core/lazy" FSI_BASIC
-
+#endif
[]
let ``letrec-FSC_BASIC`` () = singleTestBuildAndRun "core/letrec" FSC_BASIC
-
+#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``letrec-FSI_BASIC`` () = singleTestBuildAndRun "core/letrec" FSI_BASIC
-
+#endif
[]
let ``letrec (mutrec variations part one) FSC_BASIC`` () = singleTestBuildAndRun "core/letrec-mutrec" FSC_BASIC
-
+#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``letrec (mutrec variations part one) FSI_BASIC`` () = singleTestBuildAndRun "core/letrec-mutrec" FSI_BASIC
-
+#endif
[]
let ``libtest-FSC_BASIC`` () = singleTestBuildAndRun "core/libtest" FSC_BASIC
@@ -109,10 +109,10 @@ module CoreTests =
[]
let map () = singleTestBuildAndRun "core/map" FSC_BASIC
-
+#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[]
let ``measures-FSI_BASIC`` () = singleTestBuildAndRun "core/measures" FSI_BASIC
-
+#endif
[]
let ``measures-FSC_BASIC`` () = singleTestBuildAndRun "core/measures" FSC_BASIC
@@ -160,20 +160,18 @@ module CoreTests =
[]
let subtype () = singleTestBuildAndRun "core/subtype" FSC_BASIC
- []
- let ``quotes-FSC-BASIC`` () = singleTestBuildAndRun "core/quotes" FSC_BASIC
-
[]
let syntax () = singleTestBuildAndRun "core/syntax" FSC_BASIC
[]
let ``test int32`` () = singleTestBuildAndRun "core/int32" FSC_BASIC
-#endif
-
// All tests below here are enabled only for .NET Framework. We should aim to enable at least all tests mentioning FSC_BASIC or FSI_BASIC
#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
+ []
+ let ``quotes-FSC-BASIC`` () = singleTestBuildAndRun "core/quotes" FSC_BASIC
+
[]
let ``attributes-FSC_BASIC`` () = singleTestBuildAndRun "core/attributes" FSC_BASIC
diff --git a/tests/fsharpqa/Source/.gitignore b/tests/fsharpqa/Source/.gitignore
index 3e60a21cfe..894d1569f2 100644
--- a/tests/fsharpqa/Source/.gitignore
+++ b/tests/fsharpqa/Source/.gitignore
@@ -1,3 +1,6 @@
+*test*fsharpqa-errors.env
+*test*fsharpqa-errors.lst
+*test*,*.lst
#ignore all build outputs
*.exe
diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OptionalArguments/env.lst b/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OptionalArguments/env.lst
index d9dc3e051a..208e54c40e 100644
--- a/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OptionalArguments/env.lst
+++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OptionalArguments/env.lst
@@ -4,8 +4,8 @@
SOURCE=E_SanityCheck.fs
SOURCE=E_SanityCheck02.fs
SOURCE=SanityCheck03.fs
-
- SOURCE=OptArgsFromCOM.fs SCFLAGS="-r:WbemScripting.dll" PRECMD="tlbimp %SystemRoot%\\%SYSWOW64%\\wbem\\wbemdisp.tlb" # OptArgsFromCOM.fs
+
+ SOURCE=OptArgsFromCOM.fs SCFLAGS="-r:WbemScripting.dll" PRECMD="tlbimp %SystemRoot%\\SYSWOW64\\wbem\\wbemdisp.tlb" # OptArgsFromCOM.fs
SOURCE=NullOptArgsFromVB.fs SCFLAGS="-r:TestLibVB.dll" PRECMD="\$VBC_PIPE /t:library TestLibVB.vb" # NullOptArgsFromVB.fs
SOURCE=NullOptArgsFromCS.fs SCFLAGS="-r:TestLib.dll" PRECMD="\$CSC_PIPE /t:library TestLib.cs" # NullOptArgsFromCS.fs
SOURCE=SanityOptArgsFromCS.fs SCFLAGS="-r:TestLib.dll" PRECMD="\$CSC_PIPE /t:library TestLib.cs" # SanityOptArgsFromCS.fs
diff --git a/tests/scripts/DeployProj.fsx b/tests/scripts/DeployProj.fsx
index f7dcd22a04..b56ded0fca 100644
--- a/tests/scripts/DeployProj.fsx
+++ b/tests/scripts/DeployProj.fsx
@@ -10,7 +10,7 @@ let root = Path.GetFullPath (__SOURCE_DIRECTORY__ ++ ".." ++ "..")
try
let ProjectJsonLock = getCmdLineArg "--projectJsonLock:" (root ++ "tests" ++ "fsharp" ++ "project.lock.json")
let PackagesDir = getCmdLineArg "--packagesDir:" (root ++ "packages")
- let Framework = getCmdLineArg "--framework:" ".NETStandard,Version=v1.6"
+ let Framework = getCmdLineArg "--framework:" ".NETCoreApp,Version=v1.0"
let Platform = getCmdLineArg "--platform:" defaultPlatform
let FSharpCore = getCmdLineArg "--fsharpCore:" @"release/coreclr/bin/FSharp.Core.dll"
let Output = getCmdLineArg "--output:" @"."
diff --git a/tests/scripts/fscc.fsx b/tests/scripts/fscc.fsx
index 59f0d0ca29..ef560f2384 100644
--- a/tests/scripts/fscc.fsx
+++ b/tests/scripts/fscc.fsx
@@ -6,24 +6,37 @@
open System
open System.IO
-let root = Path.GetFullPath (__SOURCE_DIRECTORY__ ++ ".." ++ "..")
-let Platform = getCmdLineArg "--platform:" "win7-x64"
-let ProjectJsonLock = getCmdLineArg "--projectJsonLock:" (root ++ "tests" ++ "fsharp" ++ "project.lock.json")
-let PackagesDir = getCmdLineArg "--packagesDir:" (root ++ "packages")
-let FrameworkName = getCmdLineArg "--framework:" ".NETStandard,Version=v1.6"
-let Verbosity = getCmdLineArg "--verbose:" "quiet"
-let CompilerPathOpt = getCmdLineArgOptional "--compilerPath:"
-let Flavour = getCmdLineArg "--flavour:" "release"
-let ExtraArgs = getCmdLineExtraArgs (fun x -> List.exists x.StartsWith ["--platform:";"--projectJsonLock:";"--packagesDir:";"--framework:";"--verbose:";"--compilerPath:";"--flavour:"])
-
-let CompilerPath = defaultArg CompilerPathOpt (root ++ "tests" ++ "testbin" ++ Flavour ++ "coreclr" ++ "fsc" ++ Platform)
-let Win32Manifest = CompilerPath ++ "default.win32manifest"
+let root = Path.GetFullPath (__SOURCE_DIRECTORY__ ++ ".." ++ "..")
+let Platform = getCmdLineArg "--platform:" "win7-x64"
+let ProjectJsonLock = getCmdLineArg "--projectJsonLock:" (root ++ "tests" ++ "fsharp" ++ "FSharp.Tests.FSharpSuite.DrivingCoreCLR" ++ "project.lock.json")
+let PackagesDir = getCmdLineArg "--packagesDir:" (root ++ "packages")
+let FrameworkName = getCmdLineArg "--framework:" ".NETCoreApp,Version=v1.0"
+let Verbosity = getCmdLineArg "--verbose:" "quiet"
+let CompilerPathOpt = getCmdLineArgOptional "--compilerPath:"
+let Flavour = getCmdLineArg "--flavour:" "release"
+let TestName = getCmdLineArg "--TestName:" "test"
+let OutputDir = getCmdLineArg "--OutputDir:" ("bin" ++ Flavour)
+let ExtraArgs = getCmdLineExtraArgs (fun x -> List.exists x.StartsWith ["--platform:";"--projectJsonLock:";"--packagesDir:";"--framework:";"--verbose:";"--compilerPath:";"--flavour:";"--TestName:";"--OutputDir:"])
+
+let CompilerPath = defaultArg CompilerPathOpt (root ++ "tests" ++ "testbin" ++ Flavour ++ "coreclr" ++ "fsc")
+let Win32Manifest = CompilerPath ++ "default.win32manifest"
let isRepro = Verbosity = "repro" || Verbosity = "verbose"
let isVerbose = Verbosity = "verbose"
let dependencies = CrackProjectJson.collectReferences (isVerbose, PackagesDir, FrameworkName + "/" + Platform, ProjectJsonLock, false, false)
+let runtimeConfigLines =
+ [| "{";
+ " \"runtimeOptions\": {";
+ " \"framework\": {";
+ " \"name\": \"Microsoft.NETCore.App\",";
+ " \"version\": \"1.0.1\"";
+ " }";
+ " }";
+ "}" |]
+
+
let executeCompiler references =
let Win32manifest=Path.Combine(CompilerPath, "default.win32manifest")
let addReferenceSwitch list = list |> Seq.map(fun i -> sprintf "-r:%s" i)
@@ -32,17 +45,17 @@ let executeCompiler references =
yield "--simpleresolution"
yield "--targetprofile:netcore"
yield "--win32manifest:" + Win32Manifest
- yield "-r:"+ (CompilerPath ++ "FSharp.Core.dll")
yield! addReferenceSwitch references
yield! ExtraArgs ]
- let coreRunExe = (CompilerPath ++ "CoreRun.exe")
+ let coreRunExe = (root ++ "Tools" ++ "dotnetcli" ++ "dotnet.exe")
let fscExe = (CompilerPath ++ "fsc.exe")
let arguments2 = sprintf @"%s %s" fscExe (String.concat " " arguments)
- if isRepro then
- File.WriteAllLines("fsc.cmd.args", arguments)
+ if isVerbose then
log "%s %s" coreRunExe arguments2
log "%s %s @fsc.cmd.args" coreRunExe fscExe
+ File.WriteAllLines(OutputDir ++ "fsc.cmd.args", arguments)
+ File.WriteAllLines(OutputDir ++ (TestName + ".runtimeconfig.json"), runtimeConfigLines)
executeProcess coreRunExe arguments2
exit (executeCompiler dependencies)