Commit 0403b01f authored by Duncan Coutts's avatar Duncan Coutts Committed by Alexis Williams
Browse files

Add an integration test for local tarball packages

parent 82ba8f13
......@@ -30,6 +30,9 @@ Extra-Source-Files:
tests/IntegrationTests2/build/keep-going/p/p.cabal
tests/IntegrationTests2/build/keep-going/q/Q.hs
tests/IntegrationTests2/build/keep-going/q/q.cabal
tests/IntegrationTests2/build/local-tarball/cabal.project
tests/IntegrationTests2/build/local-tarball/q/Q.hs
tests/IntegrationTests2/build/local-tarball/q/q.cabal
tests/IntegrationTests2/build/setup-custom1/A.hs
tests/IntegrationTests2/build/setup-custom1/Setup.hs
tests/IntegrationTests2/build/setup-custom1/a.cabal
......@@ -89,6 +92,10 @@ Extra-Source-Files:
tests/IntegrationTests2/targets/variety/p.cabal
-- END gen-extra-source-files
-- Additional manual extra-source-files:
tests/IntegrationTests2/build/local-tarball/p-0.1.tar.gz
source-repository head
type: git
location: https://github.com/haskell/cabal/
......
......@@ -117,6 +117,7 @@ tests config =
, testGroup "Successful builds" $
[ testCaseSteps "Setup script styles" (testSetupScriptStyles config)
, testCase "keep-going" (testBuildKeepGoing config)
, testCase "local tarball" (testBuildLocalTarball config)
]
, testGroup "Regression tests" $
......@@ -1414,6 +1415,18 @@ testBuildKeepGoing config = do
}
}
-- | Test we can successfully build packages from local tarball files.
--
testBuildLocalTarball :: ProjectConfig -> Assertion
testBuildLocalTarball config = do
-- P is a tarball package, Q is a local dir package that depends on it.
(plan, res) <- executePlan =<< planProject testdir config
_ <- expectPackageInstalled plan res "p-0.1"
_ <- expectPackageInstalled plan res "q-0.1"
return ()
where
testdir = "build/local-tarball"
-- | See <https://github.com/haskell/cabal/issues/3324>
--
testRegressionIssue3324 :: ProjectConfig -> Assertion
......
name: q
version: 0.1
build-type: Simple
cabal-version: >= 1.2
library
exposed-modules: Q
build-depends: base, 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