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

Commitce944e6

Browse files
committed
More complete nuget integration
fixesdotnet#204closesdotnet#205commit 58daf0401c282958e8ac563afba2abbd7c7464a7Merge: 9c14a50c9026a9Author: latkin <latkin@microsoft.com>Date: Wed Feb 4 12:21:42 2015 -0800 Merge branch 'use-nuget-nunit' ofhttps://github.com/latkin/visualfsharp into latkin-use-nuget-nunit Conflicts: appveyor-build.cmdcommitc9026a9Author: latkin <latkin@microsoft.com>Date: Tue Feb 3 13:12:28 2015 -0800 No need to update the PATH for AppVeyor any morecommited4a32fAuthor: latkin <latkin@microsoft.com>Date: Tue Feb 3 13:05:05 2015 -0800 Use nuget-obtained NUnit everywhere, seamlesslyConflicts:tests/RunTests.cmd
1 parent8d6c67c commitce944e6

File tree

5 files changed

+32
-45
lines changed

5 files changed

+32
-45
lines changed

‎appveyor-build.cmd‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,42 +20,42 @@ if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :eof
2020
%_ngenexe% install Proto\net40\bin\fsc-proto.exe
2121
@if ERRORLEVEL1echo Error: NGen of proto failed&&goto :eof
2222

23-
%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:Configuration=Release
23+
%_msbuildexe% src/fsharp-library-build.proj /p:Configuration=Release
2424
@if ERRORLEVEL1echo Error: library build failed&&goto :eof
2525

26-
%_msbuildexe% src/fsharp-compiler-build.proj /p:UseNugetPackages=true /p:Configuration=Release
26+
%_msbuildexe% src/fsharp-compiler-build.proj /p:Configuration=Release
2727
@if ERRORLEVEL1echo Error: compiler build failed&&goto :eof
2828

2929
REM We don't build new net20 FSharp.Core anymore
30-
REM %_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=net20
30+
REM %_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=net20
3131
REM @if ERRORLEVEL 1 echo Error: library net20 build failed && goto :eof
3232

33-
%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable47 /p:Configuration=Release
33+
%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
3434
@if ERRORLEVEL1echo Error: library portable47 build failed&&goto :eof
3535

36-
%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable7 /p:Configuration=Release
36+
%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
3737
@if ERRORLEVEL1echo Error: library portable7 build failed&&goto :eof
3838

3939

40-
%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable78 /p:Configuration=Release
40+
%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
4141
@if ERRORLEVEL1echo Error: library portable78 build failed&&goto :eof
4242

43-
%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable259 /p:Configuration=Release
43+
%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
4444
@if ERRORLEVEL1echo Error: library portable259 build failed&&goto :eof
4545

4646

4747

4848

49-
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:Configuration=Release
49+
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:Configuration=Release
5050
@if ERRORLEVEL1echo Error: library unittests build failed&&goto :eof
5151

52-
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable47 /p:Configuration=Release
52+
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
5353
@if ERRORLEVEL1echo Error: library unittests build failed portable47&&goto :eof
5454

55-
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable7 /p:Configuration=Release
55+
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
5656
@if ERRORLEVEL1echo Error: library unittests build failed portable7&&goto :eof
5757

58-
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable78 /p:Configuration=Release
58+
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
5959
@if ERRORLEVEL1echo Error: library unittests build failed portable78&&goto :eof
6060

6161

@@ -78,11 +78,7 @@ REM Disabled while working out perl problem, see https://github.com/Microsoft/vi
7878
REM call RunTests.cmd release fsharpqa Smoke
7979
REM @if ERRORLEVEL 1 echo Error: 'RunTests.cmd release fsharpqa Smoke' failed && goto :eof
8080

81-
setPATH=%PATH%;%~dp0%packages\NUnit.Runners.2.6.3\tools\
8281
call RunTests.cmd release coreunit
8382
@if ERRORLEVEL1echo Error: 'RunTests.cmd release coreunit' failed&&goto :eof
8483

8584
popd
86-
87-
88-

‎src/FSharpSource.targets‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,4 +731,7 @@
731731
<CompileBeforeRemove="@(CompileBefore)"/>
732732
</ItemGroup>
733733
</Target>
734+
<TargetName="BeforeBuild"BeforeTargets="Build">
735+
<ExecCommand=".\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages"WorkingDirectory="$(FSharpSourcesRoot)\.."/>
736+
</Target>
734737
</Project>

‎src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@
2020
<Optimize>false</Optimize>
2121
<Tailcalls>false</Tailcalls>
2222
<TargetProfileCondition=" '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259'">netcore</TargetProfile>
23-
<!-- workaround for msbuild narrowing the assembly search paths when building portable libs-->
24-
<AssemblySearchPathsCondition="$(TargetFramework.Contains('portable'))">
25-
{CandidateAssemblyFiles};
26-
{TargetFrameworkDirectory};
27-
{Registry:Software\Microsoft\.NETFramework,v4.5,AssemblyFoldersEx};
28-
</AssemblySearchPaths>
2923
</PropertyGroup>
3024
<PropertyGroup>
3125
<DefineConstantsCondition=" '$(TargetFramework)' == 'sl5'">$(DefineConstants);SILVERLIGHT</DefineConstants>
@@ -52,6 +46,7 @@
5246
<!-- need full name and SpecificVersion = true in order to convince msbuild to allow this reference when targeting portable47-->
5347
<ReferenceInclude="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"Condition="'$(TargetFramework)' != 'sl5' AND '$(TargetFramework)' != 'sl3-wp'" >
5448
<SpecificVersion>true</SpecificVersion>
49+
<HintPath>$(FSharpSourcesRoot)\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
5550
</Reference>
5651
<ReferenceInclude="NUnitFramework"Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl3-wp'" />
5752
<ProjectReferenceInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj">
@@ -107,10 +102,4 @@
107102
<CompileInclude="SurfaceArea.4.0.fs"Condition="'$(TargetFramework)' == 'net40'"/>
108103
</ItemGroup>
109104
<ImportProject="$(FSharpSourcesRoot)\FSharpSource.targets" />
110-
<TargetName="BeforeResolveReferences"Condition="'$(UseNugetPackages)'=='true'">
111-
<CreatePropertyValue="$(ProjectDir)..\..\..\packages\NUnit.2.6.3\lib\;$(AssemblySearchPaths)">
112-
<OutputTaskParameter="Value"
113-
PropertyName="AssemblySearchPaths" />
114-
</CreateProperty>
115-
</Target>
116105
</Project>

‎tests/RunTests.cmd‎

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ IF NOT DEFINED APPVEYOR_CI (
4343
rem path to fsc.exe which will be used by tests
4444
setFSCBINPATH=%~dp0..\%FLAVOR%\net40\bin
4545

46+
rem path to nunit runners
47+
setNUNITDIR=%~dp0..\packages\NUnit.Runners.2.6.3\tools
48+
ifnotexist"%NUNITDIR%" (
49+
pushd%~dp0..
50+
.\.nuget\nuget.exe restore packages.config -PackagesDirectory packages
51+
popd
52+
)
53+
4654
rem folder where test logs/results will be dropped
4755
setRESULTSDIR=%~dp0\TestResults
4856
ifnotexist"%RESULTSDIR%" (mkdir"%RESULTSDIR%")
@@ -178,13 +186,8 @@ set XMLFILE=CoreUnit_%coreunitsuffix%_Xml.xml
178186
setOUTPUTFILE=CoreUnit_%coreunitsuffix%_Output.log
179187
setERRORFILE=CoreUnit_%coreunitsuffix%_Error.log
180188

181-
where.exe nunit-console.exe>NUL2>NUL
182-
iferrorlevel1 (
183-
echo Error: nunit-console.exe is not in the PATH
184-
exit /b1
185-
)
186-
echo nunit-console.exe /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR%%FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll
187-
nunit-console.exe /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR%%FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll
189+
echo"%NUNITDIR%\nunit-console.exe" /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR%%FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll
190+
"%NUNITDIR%\nunit-console.exe" /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR%%FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll
188191

189192
goto :EOF
190193

@@ -194,16 +197,9 @@ set XMLFILE=IDEUnit_Xml.xml
194197
setOUTPUTFILE=IDEUnit_Output.log
195198
setERRORFILE=IDEUnit_Error.log
196199

197-
where.exe nunit-console-x86.exe>NUL2>NUL
198-
iferrorlevel1 (
199-
echo Error: nunit-console-x86.exe is not in the PATH
200-
exit /b1
201-
)
202-
203-
for /f"tokens=*"%%ain ('where.exe nunit-console-x86.exe')do (set nunitlocation=%%~dpa)
204-
xcopy /y"%nunitlocation%\lib\*.dll""%FSCBINPATH%"
200+
xcopy /y"%NUNITDIR%\lib\*.dll""%FSCBINPATH%"
205201

206-
echo nunit-console-x86.exe /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR%%FSCBINPATH%\Unittests.dll
207-
nunit-console-x86.exe /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR%%FSCBINPATH%\Unittests.dll
202+
echo"%NUNITDIR%\nunit-console-x86.exe" /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR%%FSCBINPATH%\Unittests.dll
203+
"%NUNITDIR%\nunit-console-x86.exe" /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR%%FSCBINPATH%\Unittests.dll
208204

209205
goto :EOF

‎vsintegration/src/unittests/Unittests.fsproj‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@
112112
<ReferenceInclude="Microsoft.VisualStudio.Designer.Interfaces" />
113113
<ReferenceInclude="Microsoft.VisualStudio.CommonIDE" />
114114
<ReferenceInclude="Microsoft.VisualStudio.VSHelp.dll" />
115-
<ReferenceInclude="nunit.framework.dll" />
115+
<ReferenceInclude="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
116+
<SpecificVersion>true</SpecificVersion>
117+
<HintPath>$(FSharpSourcesRoot)\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
118+
</Reference>
116119
<ProjectReferenceInclude="$(FSharpSourcesRoot)\fsharp\Fsc\Fsc.fsproj">
117120
<Project>{ffde9e47-9675-4498-b540-69b2583dd600}</Project>
118121
<Name>Fsc</Name>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp