From eb69fe68907945ffcefc85592ca2e07c61d61631 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Sat, 31 May 2014 21:11:56 +0200 Subject: [PATCH] Build: quick-flag to disable long tests; prepare appveyor+travis --- .travis.yml | 12 ++++++++++++ README.md | 3 ++- appveyor.yml | 6 ++++++ build.fsx | 3 ++- docs/content/index.fsx | 1 + .../DistributionTests/CommonDistributionTests.cs | 8 ++++---- 6 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 .travis.yml create mode 100644 appveyor.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..2673bb7d --- /dev/null +++ b/.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 \ No newline at end of file diff --git a/README.md b/README.md index b232730e..776c9404 100644 --- a/README.md +++ b/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 diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..995ffef7 --- /dev/null +++ b/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 \ No newline at end of file diff --git a/build.fsx b/build.fsx index 8ec923b8..61eebdc5 100644 --- a/build.fsx +++ b/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" diff --git a/docs/content/index.fsx b/docs/content/index.fsx index 656a15e5..c26ac6f7 100644 --- a/docs/content/index.fsx +++ b/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 diff --git a/src/UnitTests/DistributionTests/CommonDistributionTests.cs b/src/UnitTests/DistributionTests/CommonDistributionTests.cs index ff41f1e5..bac16578 100644 --- a/src/UnitTests/DistributionTests/CommonDistributionTests.cs +++ b/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)