-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9671 from mpickering/wip/cabal-install-Cabal
Use in-tree Cabal library for `cabal-install` tests with custom setup.
- Loading branch information
Showing
21 changed files
with
186 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import Test.Cabal.Prelude | ||
main = setupTest $ do | ||
skipUnless "no Cabal for GHC" =<< hasCabalForGhc | ||
setup' "configure" [] >>= assertOutputContains "ThisIsCustomYeah" | ||
setup' "build" [] >>= assertOutputContains "ThisIsCustomYeah" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
-- Test internal custom preprocessor | ||
main = setupTest $ do | ||
skipUnless "no Cabal for GHC" =<< hasCabalForGhc | ||
setup_build [] | ||
runExe' "hello-world" [] | ||
>>= assertOutputContains "hello from A" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import Test.Cabal.Prelude | ||
main = setupTest $ do | ||
skipIfGhcVersion "== 7.8.4" | ||
recordMode DoNotRecord $ do | ||
skipUnless "no Cabal for GHC" =<< hasCabalForGhc | ||
setup' "configure" ["--enable-tests", "--enable-coverage"] >>= assertOutputContains "ThisIsCustomYeah" | ||
setup' "build" [] | ||
setup' "test" [] >>= assertOutputContains "Package coverage report written to" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/cabal.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +0,0 @@ | ||
# cabal v2-update | ||
Downloading the latest package list from test-local-repo | ||
# cabal v2-repl | ||
Resolving dependencies... | ||
Error: [Cabal-7107] | ||
Could not resolve dependencies: | ||
[__0] trying: pkg-a-0 (user goal) | ||
[__1] next goal: pkg-a:setup.Cabal (dependency of pkg-a) | ||
[__1] rejecting: pkg-a:setup.Cabal-<VERSION>/installed-<HASH>, pkg-a:setup.Cabal-3.8.0.0 (constraint from --enable-multi-repl requires >=3.11) | ||
[__1] fail (backjumping, conflict set: pkg-a, pkg-a:setup.Cabal) | ||
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: pkg-a:setup.Cabal (3), pkg-a (2) | ||
7 changes: 5 additions & 2 deletions
7
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ withRepo "repo" $ do | ||
main = cabalTest $ recordMode DoNotRecord . withRepo "repo" $ do | ||
-- For the multi-repl command | ||
skipUnlessGhcVersion ">= 9.4" | ||
void $ fails $ cabalWithStdin "v2-repl" ["--keep-temp-files","--enable-multi-repl","pkg-a", "pkg-b"] "" | ||
skipUnlessAnyCabalVersion "< 3.11" | ||
res <- fails $ cabalWithStdin "v2-repl" ["--keep-temp-files","--enable-multi-repl","pkg-a", "pkg-b"] "" | ||
assertOutputContains "constraint from --enable-multi-repl requires >=3.11" res |
9 changes: 0 additions & 9 deletions
9
cabal-testsuite/PackageTests/MultiRepl/EnabledBadClosure/cabal.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +0,0 @@ | ||
# cabal v2-repl | ||
Resolving dependencies... | ||
Error: [Cabal-7107] | ||
Could not resolve dependencies: | ||
[__0] trying: pkg-b-0 (user goal) | ||
[__1] next goal: pkg-b:setup.Cabal (dependency of pkg-b) | ||
[__1] rejecting: pkg-b:setup.Cabal-<VERSION>/installed-<HASH> (constraint from --enable-multi-repl requires >=3.11) | ||
[__1] fail (backjumping, conflict set: pkg-b, pkg-b:setup.Cabal) | ||
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: pkg-b (2), pkg-b:setup.Cabal (2) | ||
5 changes: 2 additions & 3 deletions
5
cabal-testsuite/PackageTests/MultiRepl/EnabledBadClosure/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
cabal-testsuite/PackageTests/PackageDB/cabal-fail-no-packagedbs.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ do | ||
withPackageDb $ do | ||
noCabalPackageDb . withPackageDb $ do | ||
withDirectory "p-no-package-dbs" $ do | ||
res <- fails $ cabal' "v2-build" [] | ||
assertOutputContains "No package databases have been specified." res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
cabal-testsuite/PackageTests/TestSuiteTests/LibV09/setup-deadlock.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Test.Cabal.Prelude | ||
main = setupAndCabalTest $ do | ||
skipUnless "no Cabal for GHC" =<< hasCabalForGhc | ||
skipIfAllCabalVersion "< 2.2" | ||
setup_build ["--enable-tests"] | ||
fails $ setup "test" [] |
2 changes: 1 addition & 1 deletion
2
cabal-testsuite/PackageTests/TestSuiteTests/LibV09/setup.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Test.Cabal.Prelude | ||
-- Test if detailed-0.9 builds correctly | ||
main = setupAndCabalTest $ do | ||
skipUnless "no Cabal for GHC" =<< hasCabalForGhc | ||
skipIfAllCabalVersion "< 1.20" | ||
setup_build ["--enable-tests"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.