Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite735169

Browse files
committed
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)
1 parent114d643 commite735169

File tree

14 files changed

+46
-41
lines changed

14 files changed

+46
-41
lines changed

‎tests/RunTests.cmd‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,19 @@ set PATH=%FSCBINPATH%;%PATH%
9393
REM == VS-installed paths to FSharp.Core.dll
9494
setFSCOREDLLPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0
9595
setFSCOREDLL20PATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v2.0\2.3.0.0
96+
setFSCOREDLLPORTABLEPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1
97+
setFSDATATPPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers
9698

9799
REM == open source logic
98100
ifexist"%FSCBinPath%\FSharp.Core.dll"setFSCOREDLLPATH=%FSCBinPath%
99101
ifexist"%FSCBinPath%\..\..\net20\bin\FSharp.Core.dll"setFSCOREDLL20PATH=%FSCBinPath%\..\..\net20\bin
102+
ifexist"%FSCBinPath%\..\..\portable47\bin\FSharp.Core.dll"setFSCOREDLLPORTABLEPATH=%FSCBinPath%\..\..\portable47\bin
103+
ifexist"%FSCBinPath%\FSharp.Data.TypeProviders.dll"setFSDATATPPATH=%FSCBinPath%
100104

101105
setFSCOREDLLPATH=%FSCOREDLLPATH%\FSharp.Core.dll
102106
setFSCOREDLL20PATH=%FSCOREDLL20PATH%\FSharp.Core.dll
107+
setFSCOREDLLPORTABLEPATH=%FSCOREDLLPORTABLEPATH%\FSharp.Core.dll
108+
setFSDATATPPATH=%FSDATATPPATH%\FSharp.Data.TypeProviders.dll
103109

104110
for /d%%iin (%WINDIR%\Microsoft.NET\Framework\v4.0.?????)dosetCORDIR=%%i
105111
setPATH=%PATH%;%CORDIR%

‎tests/config.bat‎

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,8 @@ IF NOT DEFINED FSI SET FSI=%fsiroot%.
158158
IFDEFINED FSCBinPathIFEXIST"%FSCBinPath%\fsc.exe"SETFSC=%FSCBinPath%\fsc.exe
159159
IFDEFINED FSCBinPathIFEXIST"%FSCBinPath%\%fsiroot%.exe"SETFSI=%FSCBinPath%\%fsiroot%.exe
160160

161-
REM == In Visual Studio deployments, FSharp.Core.dll is not sitting next to fsc.exe
162-
REM == In open source builds, it is.
163-
REM == Logic here should locate the right path in either case, for both .NET 4 and .NET 2 versions
164-
setFSCOREDLLPATH=
165-
setFSCOREDLL20PATH=
166-
call :GetFSCOREDLLPaths
167-
168-
IFEXIST"%FSCBinPath%\FSharp.Core.dll"setFSCOREDLLPATH=%FSCBinPath%
169-
setFSCOREDLLPATH=%FSCOREDLLPATH%\FSharp.Core.dll
170-
171-
setFSCOREDLL20PATH=%FSCOREDLL20PATH%\FSharp.Core.dll
172-
IFEXIST"%FSCBinPath%..\..\net20\bin\FSharp.Core.dll"setFSCOREDLL20PATH=%FSCBinPath%..\..\net20\bin\FSharp.Core.dll
161+
REM == Located F# library DLLs in either open or Visual Studio contexts
162+
call :GetFSLibPaths
173163

174164
REM == Set standard flags for invoking powershell scripts
175165
IFNOTDEFINED PSH_FLAGSSETPSH_FLAGS=-nologo -noprofile -executionpolicy bypass
@@ -217,6 +207,8 @@ echo fsc_flags =%fsc_flags%
217207
echo FSCBinPath =%FSCBinPath%
218208
echo FSCOREDLL20PATH =%FSCOREDLL20PATH%
219209
echo FSCOREDLLPATH =%FSCOREDLLPATH%
210+
echo FSCOREDLLPORTABLEPATH =%FSCOREDLLPATH%
211+
echo FSDATATPPATH =%FSDATATPPATH%
220212
echo FSDIFF =%FSDIFF%
221213
echo FSI =%FSI%
222214
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
246238
goto :EOF
247239

248240
REM ===
249-
REM === Find path to FSharp.Core.dll (in Dev11, this is under Reference Assemblies\Microsoft\FSharp\3.0\Runtime\v4.0 and v2.0)
250-
REM === in Dev12, this is under Reference Assemblies\Microsoft\FSharp\{.NETFramework|.NETCore|.NETPortable}\...
241+
REM === Find paths to shipped F# libraries referenced by clients
251242
REM ===
252-
:GetFSCOREDLLPaths
243+
:GetFSLibPaths
253244

254245
REM == Find out OS architecture, no matter what cmd prompt
255246
SETOSARCH=%PROCESSOR_ARCHITECTURE%
@@ -262,6 +253,19 @@ IF /I "%OSARCH%"=="x86" set X86_PROGRAMFILES=%ProgramFiles%
262253
IF /I"%OSARCH%"=="IA64"setX86_PROGRAMFILES=%ProgramFiles(x86)%
263254
IF /I"%OSARCH%"=="AMD64"setX86_PROGRAMFILES=%ProgramFiles(x86)%
264255

265-
REM ==Set path to v2.0 and v4.0 FSharp.Core.dll (4.0 is the default)
256+
REM ==Default VS install locations
266257
setFSCOREDLLPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0
267-
setFSCOREDLL20PATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v2.0\2.3.0.0
258+
setFSCOREDLL20PATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v2.0\2.3.0.0
259+
setFSCOREDLLPORTABLEPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1
260+
setFSDATATPPATH=%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers
261+
262+
REM == Check if using open build instead
263+
IFEXIST"%FSCBinPath%\FSharp.Core.dll"setFSCOREDLLPATH=%FSCBinPath%
264+
IFEXIST"%FSCBinPath%\..\..\net20\bin\FSharp.Core.dll"setFSCOREDLL20PATH=%FSCBinPath%\..\..\net20\bin
265+
IFEXIST"%FSCBinPath%\..\..\portable47\bin\FSharp.Core.dll"setFSCOREDLLPORTABLEPATH=%FSCBinPath%\..\..\portable47\bin
266+
IFEXIST"%FSCBinPath%\FSharp.Data.TypeProviders.dll"setFSDATATPPATH=%FSCBinPath%
267+
268+
setFSCOREDLLPATH=%FSCOREDLLPATH%\FSharp.Core.dll
269+
setFSCOREDLL20PATH=%FSCOREDLL20PATH%\FSharp.Core.dll
270+
setFSCOREDLLPORTABLEPATH=%FSCOREDLLPORTABLEPATH%\FSharp.Core.dll
271+
setFSDATATPPATH=%FSDATATPPATH%\FSharp.Data.TypeProviders.dll

‎tests/fsharp/core/fsfromcs/CsClient.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<WarningLevel>4</WarningLevel>
3131
</PropertyGroup>
3232
<ItemGroup>
33-
<ReferenceInclude="FSharp.Core" />
33+
<ReferenceInclude="$(FSCOREDLLPATH)" />
3434
<ReferenceInclude="Test.PowerPack.Linq, Version=0.0.0.1, Culture=neutral, PublicKeyToken=a19089b1c74d0809, processorArchitecture=MSIL" />
3535
<ReferenceInclude="lib, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
3636
<SpecificVersion>False</SpecificVersion>

‎tests/fsharp/core/portable/ConsoleApplication1/portabletestentry.csproj‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@
3636
<WarningLevel>4</WarningLevel>
3737
</PropertyGroup>
3838
<ItemGroup>
39-
<ReferenceInclude="FSharp.Core, Version=2.3.5.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
40-
<SpecificVersion>False</SpecificVersion>
41-
<HintPath>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1\FSharp.Core.dll</HintPath>
42-
</Reference>
39+
<ReferenceInclude="$(FSCOREDLLPORTABLEPATH)"/>
4340
<ReferenceInclude="System" />
4441
<ReferenceInclude="System.Core" />
4542
<ReferenceInclude="System.Xml.Linq" />

‎tests/fsharp/core/portable/portableautomationhelperlibrary/portableautomationhelperlibrary.fsproj‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@
3838
</PropertyGroup>
3939
<PropertyGroup>
4040
<MinimumVisualStudioVersionCondition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
41+
<FscToolPath>$(FSCBINPATH)</FscToolPath>
4142
</PropertyGroup>
42-
<ImportProject="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.Portable.FSharp.Targets" />
43+
<ImportProject="$(FSCBINPATH)\Microsoft.Portable.FSharp.Targets" />
4344
<ItemGroup>
4445
<CompileInclude="Hooks.fs" />
4546
<CompileInclude="Extensions.fs" />
@@ -49,11 +50,7 @@
4950
<CompileInclude="System.Diagnostics.fs" />
5051
</ItemGroup>
5152
<ItemGroup>
52-
<ReferenceInclude="FSharp.Core">
53-
<Name>FSharp.Core</Name>
54-
<AssemblyName>FSharp.Core.dll</AssemblyName>
55-
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1\FSharp.Core.dll</HintPath>
56-
</Reference>
53+
<ReferenceInclude="$(FSCOREDLLPORTABLEPATH)"/>
5754
</ItemGroup>
5855
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
5956
Other similar extension points exist, see Microsoft.Common.targets.

‎tests/fsharp/core/portable/portablelibrary1/portabletestinglibrary.fsproj‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<ReferenceInclude="FSharp.Core">
4141
<Name>FSharp.Core</Name>
4242
<AssemblyName>FSharp.Core.dll</AssemblyName>
43-
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETPortable\2.3.5.1\FSharp.Core.dll</HintPath>
43+
<HintPath>$(FSCOREDLLPORTABLEPATH)</HintPath>
4444
</Reference>
4545
<ReferenceInclude="System.Xml" />
4646
<ReferenceInclude="System.Xml.Linq" />
@@ -91,8 +91,9 @@
9191
</ItemGroup>
9292
<PropertyGroup>
9393
<MinimumVisualStudioVersionCondition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
94+
<FscToolPath>$(FSCBINPATH)</FscToolPath>
9495
</PropertyGroup>
95-
<ImportProject="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.Portable.FSharp.Targets" />
96+
<ImportProject="$(FSCBINPATH)\Microsoft.Portable.FSharp.Targets" />
9697
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
9798
Other similar extension points exist, see Microsoft.Common.targets.
9899
<Target Name="BeforeBuild">

‎tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/env.lst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
SOURCE=ToplevelNamespace.fs ISCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace.dll"# ToplevelNamespace.fs - Desktop
33

44

5-
x,ReqUltimateSOURCE=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
6-
y,ReqUltimateSOURCE=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
5+
x,ReqUltimateSOURCE=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
6+
y,ReqUltimateSOURCE=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
77

‎tests/fsharpqa/Source/CompilerOptions/fsc/platform/env.lst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
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
1+
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
22

33
# Functional: the option does what it is meant to do
44
SOURCE=platf_01.fs COMPILE_ONLY=1 ISCFLAGS=" " POSTCMD="\$FSI_PIPE --nologo --quiet --debug- --exec bitnesscheck.fsx" SCFLAGS=" "# default=anycpu
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# 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)
22
NoMTSOURCE=provider.fs POSTCMD="\$CSC_PIPE /r:provider.dll /r:System.Numerics.dll consumer.cs && consumer.exe" SCFLAGS=-a# consumer.fs (Desktop)
3-
NoMT,ReqUltimateSOURCE=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)
3+
NoMT,ReqUltimateSOURCE=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)
44

55
# Simple "unit tests" on the Parse method implemented in FSharp.Core Portable (System.Numerics.BigInteger in Profile47 does not have it...)
66
# --standalone is passed so I don't have to copy FSharp.Core.dll next to the .exe (or else C# app will throw)
7-
NoMT,ReqUltimateSOURCE=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)
7+
NoMT,ReqUltimateSOURCE=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)
88
NoMTSOURCE=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)

‎tests/fsharpqa/Source/TypeProviders/Events/TestTP/TypeProviderInCSharp.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<Prefer32Bit>false</Prefer32Bit>
5555
</PropertyGroup>
5656
<ItemGroup>
57-
<ReferenceInclude="FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
57+
<ReferenceInclude="$(FSCOREDLLPATH)" />
5858
<ReferenceInclude="System" />
5959
<ReferenceInclude="System.Core" />
6060
<ReferenceInclude="System.Numerics" />

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp