forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a test for the problem where a library package has a testsuite that depends on a packge that depends on it. We should be able to handle this by having separate build plans for the library and its testsuite. The ticket for separate build plans is haskell#1575
- Loading branch information
Showing
7 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
cabal-install/tests/IntegrationTests/circular-testsuite/should_run/a/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 :: () | ||
a = () |
2 changes: 2 additions & 0 deletions
2
cabal-install/tests/IntegrationTests/circular-testsuite/should_run/a/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 |
18 changes: 18 additions & 0 deletions
18
cabal-install/tests/IntegrationTests/circular-testsuite/should_run/a/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,18 @@ | ||
name: a | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
license-file: LICENSE | ||
author: Echo Nolan | ||
category: TestSuite | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
exposed-modules: A | ||
build-depends: base | ||
default-language: Haskell2010 | ||
|
||
Test-Suite tests | ||
type: exitcode-stdio-1.0 | ||
main-is: test.hs | ||
build-depends: b |
4 changes: 4 additions & 0 deletions
4
cabal-install/tests/IntegrationTests/circular-testsuite/should_run/b/B.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 B where | ||
|
||
b :: () | ||
b = () |
2 changes: 2 additions & 0 deletions
2
cabal-install/tests/IntegrationTests/circular-testsuite/should_run/b/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 |
13 changes: 13 additions & 0 deletions
13
cabal-install/tests/IntegrationTests/circular-testsuite/should_run/b/b.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: b | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
license-file: LICENSE | ||
author: Echo Nolan | ||
category: TestSuite | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
exposed-modules: B | ||
build-depends: base, a | ||
default-language: Haskell2010 |
14 changes: 14 additions & 0 deletions
14
.../IntegrationTests/circular-testsuite/should_run/testsuite-dependencies-are-independent.sh
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,14 @@ | ||
# Helper to run Cabal | ||
cabal() { | ||
$CABAL $CABAL_ARGS "$@" | ||
} | ||
|
||
die() { | ||
echo "die: $@" | ||
exit 1 | ||
} | ||
|
||
cabal sandbox init | ||
cabal sandbox add-source a | ||
cabal sandbox add-source b | ||
cabal install --enable-tests a |