Reconfiguring a bunch of tests that were hard-coded to use Visual Studio paths to find FSharp.Core and other F# bits. They will now use open-built bits when run from an open repo. (changeset 1226736)

This commit is contained in:
latkin 2014-04-09 12:13:28 -07:00
Родитель 114d643625
Коммит e73516959c
14 изменённых файлов: 46 добавлений и 41 удалений

Просмотреть файл

@ -93,13 +93,19 @@ set PATH=%FSCBINPATH%;%PATH%
REM == VS-installed paths to FSharp.Core.dll
set FSCOREDLLPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0
set FSCOREDLL20PATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v2.0\2.3.0.0
set FSCOREDLLPORTABLEPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1
set FSDATATPPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers
REM == open source logic
if exist "%FSCBinPath%\FSharp.Core.dll" set FSCOREDLLPATH=%FSCBinPath%
if exist "%FSCBinPath%\..\..\net20\bin\FSharp.Core.dll" set FSCOREDLL20PATH=%FSCBinPath%\..\..\net20\bin
if exist "%FSCBinPath%\..\..\portable47\bin\FSharp.Core.dll" set FSCOREDLLPORTABLEPATH=%FSCBinPath%\..\..\portable47\bin
if exist "%FSCBinPath%\FSharp.Data.TypeProviders.dll" set FSDATATPPATH=%FSCBinPath%
set FSCOREDLLPATH=%FSCOREDLLPATH%\FSharp.Core.dll
set FSCOREDLL20PATH=%FSCOREDLL20PATH%\FSharp.Core.dll
set FSCOREDLLPORTABLEPATH=%FSCOREDLLPORTABLEPATH%\FSharp.Core.dll
set FSDATATPPATH=%FSDATATPPATH%\FSharp.Data.TypeProviders.dll
for /d %%i in (%WINDIR%\Microsoft.NET\Framework\v4.0.?????) do set CORDIR=%%i
set PATH=%PATH%;%CORDIR%

Просмотреть файл

@ -158,18 +158,8 @@ IF NOT DEFINED FSI SET FSI=%fsiroot%.
IF DEFINED FSCBinPath IF EXIST "%FSCBinPath%\fsc.exe" SET FSC=%FSCBinPath%\fsc.exe
IF DEFINED FSCBinPath IF EXIST "%FSCBinPath%\%fsiroot%.exe" SET FSI=%FSCBinPath%\%fsiroot%.exe
REM == In Visual Studio deployments, FSharp.Core.dll is not sitting next to fsc.exe
REM == In open source builds, it is.
REM == Logic here should locate the right path in either case, for both .NET 4 and .NET 2 versions
set FSCOREDLLPATH=
set FSCOREDLL20PATH=
call :GetFSCOREDLLPaths
IF EXIST "%FSCBinPath%\FSharp.Core.dll" set FSCOREDLLPATH=%FSCBinPath%
set FSCOREDLLPATH=%FSCOREDLLPATH%\FSharp.Core.dll
set FSCOREDLL20PATH=%FSCOREDLL20PATH%\FSharp.Core.dll
IF EXIST "%FSCBinPath%..\..\net20\bin\FSharp.Core.dll" set FSCOREDLL20PATH=%FSCBinPath%..\..\net20\bin\FSharp.Core.dll
REM == Located F# library DLLs in either open or Visual Studio contexts
call :GetFSLibPaths
REM == Set standard flags for invoking powershell scripts
IF NOT DEFINED PSH_FLAGS SET PSH_FLAGS=-nologo -noprofile -executionpolicy bypass
@ -217,6 +207,8 @@ echo fsc_flags =%fsc_flags%
echo FSCBinPath =%FSCBinPath%
echo FSCOREDLL20PATH =%FSCOREDLL20PATH%
echo FSCOREDLLPATH =%FSCOREDLLPATH%
echo FSCOREDLLPORTABLEPATH =%FSCOREDLLPATH%
echo FSDATATPPATH =%FSDATATPPATH%
echo FSDIFF =%FSDIFF%
echo FSI =%FSI%
echo fsi_flags =%fsi_flags%
@ -246,10 +238,9 @@ FOR /F "tokens=1-3*" %%a IN ('reg query "%REG_SOFTWARE%\Microsoft\FSharp\3.1\Run
goto :EOF
REM ===
REM === Find path to FSharp.Core.dll (in Dev11, this is under Reference Assemblies\Microsoft\FSharp\3.0\Runtime\v4.0 and v2.0)
REM === in Dev12, this is under Reference Assemblies\Microsoft\FSharp\{.NETFramework|.NETCore|.NETPortable}\...
REM === Find paths to shipped F# libraries referenced by clients
REM ===
:GetFSCOREDLLPaths
:GetFSLibPaths
REM == Find out OS architecture, no matter what cmd prompt
SET OSARCH=%PROCESSOR_ARCHITECTURE%
@ -262,6 +253,19 @@ IF /I "%OSARCH%"=="x86" set X86_PROGRAMFILES=%ProgramFiles%
IF /I "%OSARCH%"=="IA64" set X86_PROGRAMFILES=%ProgramFiles(x86)%
IF /I "%OSARCH%"=="AMD64" set X86_PROGRAMFILES=%ProgramFiles(x86)%
REM == Set path to v2.0 and v4.0 FSharp.Core.dll (4.0 is the default)
REM == Default VS install locations
set FSCOREDLLPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0
set FSCOREDLL20PATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v2.0\2.3.0.0
set FSCOREDLL20PATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v2.0\2.3.0.0
set FSCOREDLLPORTABLEPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1
set FSDATATPPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers
REM == Check if using open build instead
IF EXIST "%FSCBinPath%\FSharp.Core.dll" set FSCOREDLLPATH=%FSCBinPath%
IF EXIST "%FSCBinPath%\..\..\net20\bin\FSharp.Core.dll" set FSCOREDLL20PATH=%FSCBinPath%\..\..\net20\bin
IF EXIST "%FSCBinPath%\..\..\portable47\bin\FSharp.Core.dll" set FSCOREDLLPORTABLEPATH=%FSCBinPath%\..\..\portable47\bin
IF EXIST "%FSCBinPath%\FSharp.Data.TypeProviders.dll" set FSDATATPPATH=%FSCBinPath%
set FSCOREDLLPATH=%FSCOREDLLPATH%\FSharp.Core.dll
set FSCOREDLL20PATH=%FSCOREDLL20PATH%\FSharp.Core.dll
set FSCOREDLLPORTABLEPATH=%FSCOREDLLPORTABLEPATH%\FSharp.Core.dll
set FSDATATPPATH=%FSDATATPPATH%\FSharp.Data.TypeProviders.dll

Просмотреть файл

@ -30,7 +30,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FSharp.Core" />
<Reference Include="$(FSCOREDLLPATH)" />
<Reference Include="Test.PowerPack.Linq, Version=0.0.0.1, Culture=neutral, PublicKeyToken=a19089b1c74d0809, processorArchitecture=MSIL" />
<Reference Include="lib, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>

Просмотреть файл

@ -36,10 +36,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FSharp.Core, Version=2.3.5.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1\FSharp.Core.dll</HintPath>
</Reference>
<Reference Include="$(FSCOREDLLPORTABLEPATH)"/>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />

Просмотреть файл

@ -38,8 +38,9 @@
</PropertyGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
<FscToolPath>$(FSCBINPATH)</FscToolPath>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.Portable.FSharp.Targets" />
<Import Project="$(FSCBINPATH)\Microsoft.Portable.FSharp.Targets" />
<ItemGroup>
<Compile Include="Hooks.fs" />
<Compile Include="Extensions.fs" />
@ -49,11 +50,7 @@
<Compile Include="System.Diagnostics.fs" />
</ItemGroup>
<ItemGroup>
<Reference Include="FSharp.Core">
<Name>FSharp.Core</Name>
<AssemblyName>FSharp.Core.dll</AssemblyName>
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1\FSharp.Core.dll</HintPath>
</Reference>
<Reference Include="$(FSCOREDLLPORTABLEPATH)"/>
</ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

Просмотреть файл

@ -40,7 +40,7 @@
<Reference Include="FSharp.Core">
<Name>FSharp.Core</Name>
<AssemblyName>FSharp.Core.dll</AssemblyName>
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1\FSharp.Core.dll</HintPath>
<HintPath>$(FSCOREDLLPORTABLEPATH)</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
@ -91,8 +91,9 @@
</ItemGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
<FscToolPath>$(FSCBINPATH)</FscToolPath>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.Portable.FSharp.Targets" />
<Import Project="$(FSCBINPATH)\Microsoft.Portable.FSharp.Targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

Просмотреть файл

@ -2,6 +2,6 @@
SOURCE=ToplevelNamespace.fs ISCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace.dll" # ToplevelNamespace.fs - Desktop
x,ReqUltimate SOURCE=ToplevelModule.fs ISCFLAGS="-o:ToplevelModuleP.dll -a -g --test:EmitFeeFeeAs100001 --optimize- --noframework -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\FSharp\\.NETPortable\\2.3.5.1\\FSharp.Core.dll\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\mscorlib.dll\"" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModuleP.dll" # ToplevelModule.fs - Portable
y,ReqUltimate SOURCE=ToplevelNamespace.fs ISCFLAGS="-o:ToplevelNamespaceP.dll -a -g --test:EmitFeeFeeAs100001 --optimize- --noframework -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\FSharp\\.NETPortable\\2.3.5.1\\FSharp.Core.dll\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\mscorlib.dll\"" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespaceP.dll" # ToplevelNamespace.fs - Portable
x,ReqUltimate SOURCE=ToplevelModule.fs ISCFLAGS="-o:ToplevelModuleP.dll -a -g --test:EmitFeeFeeAs100001 --optimize- --noframework -r:\"%FSCOREDLLPORTABLEPATH%\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\mscorlib.dll\"" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModuleP.dll" # ToplevelModule.fs - Portable
y,ReqUltimate SOURCE=ToplevelNamespace.fs ISCFLAGS="-o:ToplevelNamespaceP.dll -a -g --test:EmitFeeFeeAs100001 --optimize- --noframework -r:\"%FSCOREDLLPORTABLEPATH%\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\mscorlib.dll\"" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespaceP.dll" # ToplevelNamespace.fs - Portable

Просмотреть файл

@ -1,4 +1,4 @@
SOURCE=error_17.fs COMPILE_ONLY=1 ISCFLAGS=" " SCFLAGS="--noframework --platform:anycpu32bitpreferred -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\FSharp\\.NETFramework\\v2.0\\2.3.0.0\\FSharp.Core.dll\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v3.5\\Profile\\Client\\mscorlib.dll\"" # anycpu32bitpreferred - downtarget
SOURCE=error_17.fs COMPILE_ONLY=1 ISCFLAGS=" " SCFLAGS="--noframework --platform:anycpu32bitpreferred -r:\"%FSCOREDLL20PATH\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v3.5\\Profile\\Client\\mscorlib.dll\"" # anycpu32bitpreferred - downtarget
# Functional: the option does what it is meant to do
SOURCE=platf_01.fs COMPILE_ONLY=1 ISCFLAGS=" " POSTCMD="\$FSI_PIPE --nologo --quiet --debug- --exec bitnesscheck.fsx" SCFLAGS=" " # default=anycpu

Просмотреть файл

@ -1,8 +1,8 @@
# C# can consume an F# assembly that exposes a type with a method that returns a System.Numeric.BigInteger (i.e. FSharp.Core portable does not define its own BigInteger - the 2 types are the same)
NoMT SOURCE=provider.fs POSTCMD="\$CSC_PIPE /r:provider.dll /r:System.Numerics.dll consumer.cs && consumer.exe" SCFLAGS=-a # consumer.fs (Desktop)
NoMT,ReqUltimate SOURCE=provider.fs SCFLAGS="-g -a --noframework -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\FSharp\\.NETPortable\\2.3.5.1\\FSharp.Core.dll\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\System.Numerics.dll\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\mscorlib.dll\"" POSTCMD="\$CSC_PIPE /r:provider.dll /r:System.Numerics.dll consumer.cs && consumer.exe" # consumer.fs (Portable)
NoMT,ReqUltimate SOURCE=provider.fs SCFLAGS="-g -a --noframework -r:\"%FSCOREPORTABLEDLLPATH%\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\System.Numerics.dll\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\mscorlib.dll\"" POSTCMD="\$CSC_PIPE /r:provider.dll /r:System.Numerics.dll consumer.cs && consumer.exe" # consumer.fs (Portable)
# Simple "unit tests" on the Parse method implemented in FSharp.Core Portable (System.Numerics.BigInteger in Profile47 does not have it...)
# --standalone is passed so I don't have to copy FSharp.Core.dll next to the .exe (or else C# app will throw)
NoMT,ReqUltimate SOURCE=parse_tests.fs SCFLAGS="--standalone -g -a --noframework -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\FSharp\\.NETPortable\\2.3.5.1\\FSharp.Core.dll\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\System.Numerics.dll\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\mscorlib.dll\"" POSTCMD="\$CSC_PIPE /define:PORTABLE /debug+ /r:parse_tests.dll /r:System.Numerics.dll parse_oracle.cs && parse_oracle.exe" # parse_tests.fs (Portable)
NoMT,ReqUltimate SOURCE=parse_tests.fs SCFLAGS="--standalone -g -a --noframework -r:\"%FSCOREPORTABLEDLLPATH%\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\System.Numerics.dll\" -r:\"%X86_PROGRAMFILES%\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable\\v4.0\\Profile\\Profile47\\mscorlib.dll\"" POSTCMD="\$CSC_PIPE /define:PORTABLE /debug+ /r:parse_tests.dll /r:System.Numerics.dll parse_oracle.cs && parse_oracle.exe" # parse_tests.fs (Portable)
NoMT SOURCE=parse_tests.fs SCFLAGS="--standalone -g -a" POSTCMD="\$CSC_PIPE /debug+ /r:parse_tests.dll /r:System.Numerics.dll parse_oracle.cs && parse_oracle.exe" # parse_tests.fs (Desktop)

Просмотреть файл

@ -54,7 +54,7 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="$(FSCOREDLLPATH)" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />

Просмотреть файл

@ -29,7 +29,7 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="$(FSCOREDLLPATH)" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />

Просмотреть файл

@ -27,7 +27,7 @@
<NoWarn />
</PropertyGroup>
<ItemGroup>
<Reference Include="FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="$(FSCOREDLLPATH)" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />

Просмотреть файл

@ -25,7 +25,7 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FSharp.Core" />
<Reference Include="$(FSCOREDLLPATH)" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />

Просмотреть файл

@ -27,8 +27,8 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FSharp.Core" />
<Reference Include="FSharp.Data.TypeProviders" />
<Reference Include="$(FSCOREDLLPATH)" />
<Reference Include="$(FSDATATPPATH)" />
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>