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

Port internal-libs to cabal-testsuite


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 975a69ae
......@@ -46,16 +46,6 @@ Extra-Source-Files:
tests/IntegrationTests/freeze/freezes_transitive_dependencies.sh
tests/IntegrationTests/freeze/my.cabal
tests/IntegrationTests/freeze/runs_without_error.sh
tests/IntegrationTests/internal-libs/cabal.project
tests/IntegrationTests/internal-libs/internal_lib_basic.sh
tests/IntegrationTests/internal-libs/internal_lib_shadow.sh
tests/IntegrationTests/internal-libs/new_build.sh
tests/IntegrationTests/internal-libs/p/Foo.hs
tests/IntegrationTests/internal-libs/p/p.cabal
tests/IntegrationTests/internal-libs/p/p/P.hs
tests/IntegrationTests/internal-libs/p/q/Q.hs
tests/IntegrationTests/internal-libs/q/Q.hs
tests/IntegrationTests/internal-libs/q/q.cabal
tests/IntegrationTests/manpage/outputs_manpage.sh
tests/IntegrationTests/multiple-source/finds_second_source_of_multiple_source.sh
tests/IntegrationTests/multiple-source/p/Setup.hs
......
. ./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
# cabal new-build
Resolving dependencies...
In order, the following will be built:
- p-0.1.0.0 (lib:q) (first run)
- p-0.1.0.0 (exe:foo) (first run)
- p-0.1.0.0 (lib) (first run)
Configuring library 'q' for p-0.1.0.0..
Preprocessing library 'q' for p-0.1.0.0..
Building library 'q' for p-0.1.0.0..
Configuring executable 'foo' for p-0.1.0.0..
Preprocessing executable 'foo' for p-0.1.0.0..
Building executable 'foo' for p-0.1.0.0..
Configuring library for p-0.1.0.0..
Preprocessing library for p-0.1.0.0..
Building library for p-0.1.0.0..
import Test.Cabal.Prelude
main = cabalTest $ do
cabal "new-build" ["p"]
# cabal sandbox init
Writing a default package environment file to <ROOT>/sandbox-shadow.dist/cabal.sandbox.config
Creating a new sandbox at <ROOT>/sandbox-shadow.dist/sandbox
# cabal sandbox add-source
# cabal sandbox add-source
# cabal install
Resolving dependencies...
Configuring p-0.1.0.0...
Preprocessing library 'q' for p-0.1.0.0..
Building library 'q' for p-0.1.0.0..
Preprocessing executable 'foo' for p-0.1.0.0..
Building executable 'foo' for p-0.1.0.0..
Preprocessing library for p-0.1.0.0..
Building library for p-0.1.0.0..
Installing internal library q in <PATH>
Installing executable foo in <PATH>
Installing library in <PATH>
Installed p-0.1.0.0
import Test.Cabal.Prelude
main = cabalTest $ do
withSandbox $ do
cabal_sandbox "add-source" ["p"]
cabal_sandbox "add-source" ["q"]
cabal "install" ["p"]
# cabal sandbox init
Writing a default package environment file to <ROOT>/sandbox.dist/cabal.sandbox.config
Creating a new sandbox at <ROOT>/sandbox.dist/sandbox
# cabal sandbox add-source
# cabal install
Resolving dependencies...
Configuring p-0.1.0.0...
Preprocessing library 'q' for p-0.1.0.0..
Building library 'q' for p-0.1.0.0..
Preprocessing executable 'foo' for p-0.1.0.0..
Building executable 'foo' for p-0.1.0.0..
Preprocessing library for p-0.1.0.0..
Building library for p-0.1.0.0..
Installing internal library q in <PATH>
Installing executable foo in <PATH>
Installing library in <PATH>
Installed p-0.1.0.0
import Test.Cabal.Prelude
main = cabalTest $ do
withSandbox $ do
cabal_sandbox "add-source" ["p"]
cabal "install" ["p"]
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