Commit fe6659f1 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Integration tests for internal libraries.



This are currently failing because there are bugs which need to be
fixed.
Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 4004b2c3
......@@ -88,7 +88,10 @@ register pkg lbi regFlags =
-- usefully (they're not public.) If we start supporting scoped
-- packages, we'll have to relax this.
when (hasPublicLib pkg) $
withLib pkg (registerOne pkg lbi regFlags)
let maybeRegister (CLib lib) _clbi =
registerOne pkg lbi regFlags lib
maybeRegister _comp _clbi = return ()
in withAllComponentsInBuildOrder pkg lbi maybeRegister
registerOne :: PackageDescription -> LocalBuildInfo -> RegisterFlags
-> Library
......
......@@ -64,6 +64,15 @@ Extra-Source-Files:
tests/IntegrationTests/freeze/should_run/freezes_transitive_dependencies.sh
tests/IntegrationTests/freeze/should_run/my.cabal
tests/IntegrationTests/freeze/should_run/runs_without_error.sh
tests/IntegrationTests/internal-libs/common.sh
tests/IntegrationTests/internal-libs/should_run/internal_lib_basic.sh
tests/IntegrationTests/internal-libs/should_run/internal_lib_shadow.sh
tests/IntegrationTests/internal-libs/should_run/p/Foo.hs
tests/IntegrationTests/internal-libs/should_run/p/p.cabal
tests/IntegrationTests/internal-libs/should_run/p/p/P.hs
tests/IntegrationTests/internal-libs/should_run/p/q/Q.hs
tests/IntegrationTests/internal-libs/should_run/q/Q.hs
tests/IntegrationTests/internal-libs/should_run/q/q.cabal
tests/IntegrationTests/manpage/common.sh
tests/IntegrationTests/manpage/should_run/outputs_manpage.sh
tests/IntegrationTests/multiple-source/common.sh
......
cabal() {
"$CABAL" $CABAL_ARGS "$@"
}
die() {
echo "die: $@"
exit 1
}
. ../common.sh
cabal sandbox init
cabal sandbox add-source p
cabal install p
. ../common.sh
cabal sandbox init
cabal sandbox add-source p
cabal sandbox add-source q
cabal install p
name: p
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.23
library q
build-depends: base
exposed-modules: Q
hs-source-dirs: q
default-language: Haskell2010
library
build-depends: base, q
exposed-modules: P
hs-source-dirs: p
default-language: Haskell2010
executable foo
build-depends: base, q
main-is: Foo.hs
name: q
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.10
library
exposed-modules: Q
build-depends: base
default-language: Haskell2010
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment