-
Notifications
You must be signed in to change notification settings - Fork 702
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for setup script handling
Covers 3 of the 4 possible cases: 1. explicit custom setup deps 2. custom setup with implicit/default deps 4. non-custom setup using the internal cabal lib version case 3 is a non-custom setup but where we're forced to use an external cabal lib version. This case is hard to test since it only happens when it's a newer (not older) Cabal lib version that the package requires, e.g. a .cabal file that specifies cabal-version: >= 2.0. Also, add a --with-ghc option to the integration test suite, which lets us more easily test with different ghc versions. Also, don't use parallel builds in any of the integration tests, as the self-exec method will not work, and some tests need to install deps for some ghc versions.
- Loading branch information
Showing
11 changed files
with
181 additions
and
26 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
4 changes: 4 additions & 0 deletions
4
cabal-install/tests/IntegrationTests2/build/setup-custom1/A.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module A where | ||
|
||
a :: Int | ||
a = 42 |
2 changes: 2 additions & 0 deletions
2
cabal-install/tests/IntegrationTests2/build/setup-custom1/Setup.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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import Distribution.Simple | ||
main = defaultMain >> writeFile "marker" "ok" |
13 changes: 13 additions & 0 deletions
13
cabal-install/tests/IntegrationTests2/build/setup-custom1/a.cabal
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: a | ||
version: 0.1 | ||
build-type: Custom | ||
cabal-version: >= 1.10 | ||
|
||
-- explicit setup deps: | ||
custom-setup | ||
setup-depends: base, Cabal >= 1.18 | ||
|
||
library | ||
exposed-modules: A | ||
build-depends: base | ||
default-language: Haskell2010 |
4 changes: 4 additions & 0 deletions
4
cabal-install/tests/IntegrationTests2/build/setup-custom2/A.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module A where | ||
|
||
a :: Int | ||
a = 42 |
2 changes: 2 additions & 0 deletions
2
cabal-install/tests/IntegrationTests2/build/setup-custom2/Setup.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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import Distribution.Simple | ||
main = defaultMain >> writeFile "marker" "ok" |
11 changes: 11 additions & 0 deletions
11
cabal-install/tests/IntegrationTests2/build/setup-custom2/a.cabal
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: a | ||
version: 0.1 | ||
build-type: Custom | ||
cabal-version: >= 1.10 | ||
|
||
-- no explicit setup deps | ||
|
||
library | ||
exposed-modules: A | ||
build-depends: base | ||
default-language: Haskell2010 |
4 changes: 4 additions & 0 deletions
4
cabal-install/tests/IntegrationTests2/build/setup-simple/A.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module A where | ||
|
||
a :: Int | ||
a = 42 |
2 changes: 2 additions & 0 deletions
2
cabal-install/tests/IntegrationTests2/build/setup-simple/Setup.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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import Distribution.Simple | ||
main = defaultMain |
9 changes: 9 additions & 0 deletions
9
cabal-install/tests/IntegrationTests2/build/setup-simple/a.cabal
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: a | ||
version: 0.1 | ||
build-type: Simple | ||
cabal-version: >= 1.10 | ||
|
||
library | ||
exposed-modules: A | ||
build-depends: base | ||
default-language: Haskell2010 |