Skip to content
Snippets Groups Projects
Commit 57f1d59a authored by kristenk's avatar kristenk
Browse files

Add integration test for building a local package with setup dependencies.

parent 1874e8d8
No related merge requests found
import SetupDep (message)
import Distribution.Simple
main = putStrLn ("pkg Setup.hs: " ++ message) >> defaultMain
# cabal update
Downloading the latest package list from test-local-repo
# cabal new-build
Resolving dependencies...
In order, the following will be built:
- setup-dep-2.0 (lib:setup-dep) (requires download & build)
- pkg-1.0 (lib:pkg) (first run)
Configuring setup-dep-2.0...
Preprocessing library for setup-dep-2.0..
Building library for setup-dep-2.0..
Installing library in <PATH>
import Test.Cabal.Prelude
-- The one local package, pkg, has a setup dependency on setup-dep-2.0, which is
-- in the repository.
main = cabalTest $ do
skipUnless =<< hasNewBuildCompatBootCabal
withRepo "repo" $ do
r <- cabal' "new-build" ["pkg"]
-- pkg's setup script should print out a message that it imported from
-- setup-dep:
assertOutputContains "pkg Setup.hs: setup-dep-2.0" r
packages: *.cabal
name: pkg
version: 1.0
build-type: Custom
cabal-version: >= 1.2
custom-setup
setup-depends: base, Cabal, setup-dep
library
module SetupDep (message) where
message = "setup-dep-2.0"
name: setup-dep
version: 2.0
build-type: Simple
cabal-version: >= 1.2
library
build-depends: base
exposed-modules: SetupDep
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment