Browse Source

Build: quick-flag to disable long tests; prepare appveyor+travis

pull/222/head
Christoph Ruegg 12 years ago
parent
commit
eb69fe6890
  1. 12
      .travis.yml
  2. 3
      README.md
  3. 6
      appveyor.yml
  4. 3
      build.fsx
  5. 1
      docs/content/index.fsx
  6. 8
      src/UnitTests/DistributionTests/CommonDistributionTests.cs

12
.travis.yml

@ -0,0 +1,12 @@
language: objective-c
env:
matrix:
- MONO_VERSION="3.2.5"
install:
- wget "http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg"
- sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target /
script:
- ./build.sh Test quick

3
README.md

@ -68,8 +68,9 @@ If you do not want to use the official binaries, or if you like to modify, debug
build.cmd Build signed # normal build, signed/strong named (.Net 4.0)
build.cmd Test # normal build (.Net 4.0), run unit tests
build.cmd Test quick # normal build (.Net 4.0), run unit tests except long running ones
build.cmd Test all # full build (.Net 4.0, 3.5, PCL), run all unit tests
build.cmd Test net35 # compatibility build (.Net 3.5), run unit tests
build.cmd Test net35 # compatibility build (.Net 3.5), run unit testss
build.cmd Clean # cleanup build artifacts
build.cmd Docs # generate documentation

6
appveyor.yml

@ -0,0 +1,6 @@
build_script:
- ps: .\build.cmd Test quick
test: off
artifacts:
- path: out\packages\NuGet\*.nupkg
- path: out\packages\Zip\*.zip

3
build.fsx

@ -143,11 +143,12 @@ Target "BuildNative" DoNothing
// TEST
let test target =
let quick p = if hasBuildParam "quick" then { p with ExcludeCategory="LongRunning" } else p
NUnit (fun p ->
{ p with
DisableShadowCopy = true
TimeOut = TimeSpan.FromMinutes 30.
OutputFile = "TestResults.xml" }) target
OutputFile = "TestResults.xml" } |> quick) target
Target "Test" (fun _ -> test !! "out/test/**/*UnitTests*.dll")
"Build" ==> "Test"

1
docs/content/index.fsx

@ -211,6 +211,7 @@ If you do not want to use the official binaries, or if you like to modify, debug
build.cmd Build signed # normal build, signed/strong named (.Net 4.0)
build.cmd Test # normal build (.Net 4.0), run unit tests
build.cmd Test quick # normal build (.Net 4.0), run unit tests except long running ones
build.cmd Test all # full build (.Net 4.0, 3.5, PCL), run all unit tests
build.cmd Test net35 # compatibility build (.Net 3.5), run unit tests

8
src/UnitTests/DistributionTests/CommonDistributionTests.cs

@ -134,7 +134,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests
}
}
[Test]
[Test, Category("LongRunning")]
public void DiscreteSampleIsDistributedCorrectly()
{
foreach (var dist in _discreteDistributions)
@ -149,7 +149,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests
}
}
[Test]
[Test, Category("LongRunning")]
public void DiscreteSampleSequenceIsDistributedCorrectly()
{
foreach (var dist in _discreteDistributions)
@ -160,7 +160,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests
}
}
[Test]
[Test, Category("LongRunning")]
public void ContinuousSampleIsDistributedCorrectly()
{
foreach (var dist in _continuousDistributions)
@ -175,7 +175,7 @@ namespace MathNet.Numerics.UnitTests.DistributionTests
}
}
[Test]
[Test, Category("LongRunning")]
public void ContinuousSampleSequenceIsDistributedCorrectly()
{
foreach (var dist in _continuousDistributions)

Loading…
Cancel
Save