Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PackageResolver Refactor #2039

Merged
merged 4 commits into from
Nov 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
module Paket.IntegrationTests.BasicResolverSpecs
#if INTERACTIVE
System.IO.Directory.SetCurrentDirectory __SOURCE_DIRECTORY__
#r "../../packages/test/NUnit/lib/net45/nunit.framework.dll"
#r "../../packages/build/FAKE/tools/Fakelib.dll"
#r "../../packages/Chessie/lib/net40/Chessie.dll"
#r "../../bin/paket.core.dll"
#load "../../paket-files/test/forki/FsUnit/FsUnit.fs"
#load "TestHelper.fs"
open Paket.IntegrationTests.TestHelpers
#else
module Paket.IntegrationTests.BasicResolverSpecs
#endif

open Fake
open Paket
Expand Down Expand Up @@ -125,3 +136,9 @@ let ``#1450 should resolve with twiddle wakka``() =
let lockFile = update "i001450-twiddle-wakka"
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "EnterpriseLibrary.SemanticLogging"].Version
|> shouldBeSmallerThan (SemVer.Parse "3")


#if INTERACTIVE
;;

#endif
20 changes: 19 additions & 1 deletion integrationtests/Paket.IntegrationTests/InstallSpecs.fs
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
module Paket.IntegrationTests.InstallSpecs
#if INTERACTIVE
System.IO.Directory.SetCurrentDirectory __SOURCE_DIRECTORY__
#r "../../packages/test/NUnit/lib/net45/nunit.framework.dll"
#r "../../packages/build/FAKE/tools/Fakelib.dll"
#r "../../packages/Chessie/lib/net40/Chessie.dll"
#r "../../bin/paket.core.dll"
#load "../../paket-files/test/forki/FsUnit/FsUnit.fs"
#load "TestHelper.fs"
open Paket.IntegrationTests.TestHelpers
#else
module Paket.IntegrationTests.InstallSpecs
#endif


open Fake
open System
Expand Down Expand Up @@ -428,3 +440,9 @@ let ``#1860 faulty condition was generated`` () =
install scenario |> ignore
let fsprojFile = (scenarioTempPath scenario) </> "Library1" </> "Library1.fsproj" |> File.ReadAllText
Assert.IsFalse (fsprojFile.Contains(" And ()"))


#if INTERACTIVE
;;

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
#if INTERACTIVE
System.IO.Directory.SetCurrentDirectory __SOURCE_DIRECTORY__
#r "../../packages/test/NUnit/lib/net45/nunit.framework.dll"
#r "../../packages/build/FAKE/tools/Fakelib.dll"
#r "../../packages/Chessie/lib/net40/Chessie.dll"
#r "../../bin/paket.core.dll"
#load "../../paket-files/test/forki/FsUnit/FsUnit.fs"
#load "TestHelper.fs"
open Paket.IntegrationTests.TestHelpers
#else
module Paket.IntegrationTests.ResolverSkipsConflictsFastSpecs
#endif

open Fake
open Paket
Expand All @@ -17,4 +28,9 @@ let ``#1166 Should resolve Nancy without timeout``() =

[<Test>]
let ``#1174 Should find Ninject error``() =
updateShouldFindPackageConflict "Ninject" "i001174-resolve-fast-conflict"
updateShouldFindPackageConflict "Ninject" "i001174-resolve-fast-conflict"

#if INTERACTIVE
;;

#endif
14 changes: 13 additions & 1 deletion integrationtests/Paket.IntegrationTests/TestHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,19 @@ let paket command scenario =
directPaket command scenario

let update scenario =
#if INTERACTIVE
paket "update --verbose" scenario |> printfn "%s"
#else
paket "update" scenario |> ignore
#endif
LockFile.LoadFrom(Path.Combine(scenarioTempPath scenario,"paket.lock"))

let install scenario =
#if INTERACTIVE
paket "install --verbose" scenario |> printfn "%s"
#else
paket "install" scenario |> ignore
#endif
LockFile.LoadFrom(Path.Combine(scenarioTempPath scenario,"paket.lock"))

let restore scenario = paket "restore" scenario |> ignore
Expand All @@ -80,4 +88,8 @@ let updateShouldFindPackageConflict packageName scenario =
update scenario |> ignore
failwith "No conflict was found."
with
| exn when exn.Message.Contains(sprintf "Could not resolve package %s:" packageName) -> ()
| exn when exn.Message.Contains(sprintf "Could not resolve package %s" packageName) ->
#if INTERACTIVE
printfn "Ninject conflict test passed"
#endif
()
Loading