Browse Source

Added F# projects to the build

Signed-off-by: Marcus Cuda <marcus@cuda.net>
pull/36/head
Marcus Cuda 17 years ago
parent
commit
eafe76800f
  1. 7
      build/build.proj
  2. 2
      src/FSharpUnitTests/FSharpUnitTests.fsproj
  3. 9
      src/FSharpUnitTests/Program.fs

7
build/build.proj

@ -10,10 +10,13 @@
<Target Name="Compile">
<MSBuild Projects="../src/Numerics/Numerics.csproj" Properties="Configuration=$(Config);Optimize=$(Optimize)" />
<MSBuild Projects="../src/UnitTests/UnitTests.csproj" Properties="Configuration=$(Config);Optimize=$(Optimize)" />
<MSBuild Projects="../src/FSharp/FSharp.fsproj" Properties="Configuration=$(Config);Optimize=$(Optimize)" />
<MSBuild Projects="../src/FSharpUnitTests/FSharpUnitTests.fsproj" Properties="Configuration=$(Config);Optimize=$(Optimize)" />
</Target>
<Target Name="Test" DependsOnTargets="Compile">
<Gallio.MSBuildTasks.Gallio ContinueOnError="False" IgnoreFailures="False" Assemblies="../src/UnitTests/bin/Debug/MathNet.Numerics.UnitTests.dll" RunnerExtensions="TeamCityExtension,Gallio.TeamCityIntegration" />
<Exec Command="$(MSBuildProjectDirectory)/../src/FSharpUnitTests/bin/Debug/FSharpUnitTests.exe" IgnoreExitCode="false" />
</Target>
<Target Name="Style">
@ -40,9 +43,11 @@
<Exec Command="ncover.reporting.exe coverage.xml //or FullCoverageReport:Html //op NCoverReport" />
</Target>
<Target Name="BuildAndTest" DependsOnTargets="Test; Style">
<Target Name="Gendarme">
<Exec Command="$(MSBuildProjectDirectory)\..\tools\Gendarme-2.4\gendarme.exe $(MSBuildProjectDirectory)\..\src\Numerics\bin\Debug\MathNet.Numerics.dll"/>
</Target>
<Target Name="BuildAndTest" DependsOnTargets="Test; Style; Gendarme"/>
<Target Name="Release" DependsOnTargets="BuildDocs"></Target>
</Project>

2
src/FSharpUnitTests/FSharpUnitTests.fsproj

@ -6,7 +6,7 @@
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{f2f8032b-a31d-4e33-a05e-f2cdcbfaa75d}</ProjectGuid>
<OutputType>Library</OutputType>
<OutputType>Exe</OutputType>
<RootNamespace>FSharpUnitTests</RootNamespace>
<AssemblyName>FSharpUnitTests</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>

9
src/FSharpUnitTests/Program.fs

@ -24,4 +24,11 @@ let DenseVectorTests =
spec "DenseVector.range"
(Double.DenseVector.range 0 99
|> should equal (new Double.DenseVector( [| for i in 0 .. 99 -> float i |] ) ))
]
]
/// Report on errors and success and exit.
printfn "F# Test Results:"
printfn "%s" (Results.summary())
let code = if Results.erredCount() > 0 || Results.failedCount() > 0 then -1 else 0;;
exit code;;
Loading…
Cancel
Save