Commit 6ede1f2b authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Add integration tests for the target resolving for each command

This covers some of the positive cases of target selector resolution
and pretty much all of the negative cases for each command.
parent 1329ec54
......@@ -3,8 +3,14 @@
-- | cabal-install CLI command: bench
--
module Distribution.Client.CmdBench (
-- * The @bench@ CLI and action
benchCommand,
benchAction,
-- * Internals exposed for testing
TargetProblem(..),
selectPackageTargets,
selectComponentTarget
) where
import Distribution.Client.ProjectOrchestration
......
-- | cabal-install CLI command: build
--
module Distribution.Client.CmdBuild (
-- * The @build@ CLI and action
buildCommand,
buildAction,
-- * Internals exposed for testing
TargetProblem(..),
selectPackageTargets,
selectComponentTarget
) where
import Distribution.Client.ProjectOrchestration
......
......@@ -3,8 +3,14 @@
-- | cabal-install CLI command: haddock
--
module Distribution.Client.CmdHaddock (
-- * The @haddock@ CLI and action
haddockCommand,
haddockAction,
-- * Internals exposed for testing
TargetProblem(..),
selectPackageTargets,
selectComponentTarget
) where
import Distribution.Client.ProjectOrchestration
......
......@@ -3,8 +3,14 @@
-- | cabal-install CLI command: repl
--
module Distribution.Client.CmdRepl (
-- * The @repl@ CLI and action
replCommand,
replAction,
-- * Internals exposed for testing
TargetProblem(..),
selectPackageTargets,
selectComponentTarget
) where
import Distribution.Client.ProjectOrchestration
......
......@@ -3,8 +3,14 @@
-- | cabal-install CLI command: run
--
module Distribution.Client.CmdRun (
-- * The @run@ CLI and action
runCommand,
runAction,
-- * Internals exposed for testing
TargetProblem(..),
selectPackageTargets,
selectComponentTarget
) where
import Distribution.Client.ProjectOrchestration
......
......@@ -3,8 +3,14 @@
-- | cabal-install CLI command: test
--
module Distribution.Client.CmdTest (
-- * The @test@ CLI and action
testCommand,
testAction,
-- * Internals exposed for testing
TargetProblem(..),
selectPackageTargets,
selectComponentTarget
) where
import Distribution.Client.ProjectOrchestration
......
......@@ -170,16 +170,42 @@ Extra-Source-Files:
tests/IntegrationTests2/regression/3324/p/p.cabal
tests/IntegrationTests2/regression/3324/q/Q.hs
tests/IntegrationTests2/regression/3324/q/q.cabal
tests/IntegrationTests2/targets/all-disabled/cabal.project
tests/IntegrationTests2/targets/all-disabled/p.cabal
tests/IntegrationTests2/targets/benchmarks-disabled/cabal.project
tests/IntegrationTests2/targets/benchmarks-disabled/p.cabal
tests/IntegrationTests2/targets/benchmarks-disabled/q/q.cabal
tests/IntegrationTests2/targets/complex/cabal.project
tests/IntegrationTests2/targets/complex/q/Q.hs
tests/IntegrationTests2/targets/complex/q/q.cabal
tests/IntegrationTests2/targets/empty-pkg/cabal.project
tests/IntegrationTests2/targets/empty-pkg/p.cabal
tests/IntegrationTests2/targets/empty/cabal.project
tests/IntegrationTests2/targets/empty/foo.hs
tests/IntegrationTests2/targets/exes-disabled/cabal.project
tests/IntegrationTests2/targets/exes-disabled/p/p.cabal
tests/IntegrationTests2/targets/exes-disabled/q/q.cabal
tests/IntegrationTests2/targets/libs-disabled/cabal.project
tests/IntegrationTests2/targets/libs-disabled/p/p.cabal
tests/IntegrationTests2/targets/libs-disabled/q/q.cabal
tests/IntegrationTests2/targets/multiple-exes/cabal.project
tests/IntegrationTests2/targets/multiple-exes/p.cabal
tests/IntegrationTests2/targets/multiple-libs/cabal.project
tests/IntegrationTests2/targets/multiple-libs/p/p.cabal
tests/IntegrationTests2/targets/multiple-libs/q/q.cabal
tests/IntegrationTests2/targets/multiple-tests/cabal.project
tests/IntegrationTests2/targets/multiple-tests/p.cabal
tests/IntegrationTests2/targets/simple/P.hs
tests/IntegrationTests2/targets/simple/cabal.project
tests/IntegrationTests2/targets/simple/p.cabal
tests/IntegrationTests2/targets/simple/q/Q.hs
tests/IntegrationTests2/targets/simple/q/q.cabal
tests/IntegrationTests2/targets/test-only/p.cabal
tests/IntegrationTests2/targets/tests-disabled/cabal.project
tests/IntegrationTests2/targets/tests-disabled/p.cabal
tests/IntegrationTests2/targets/tests-disabled/q/q.cabal
tests/IntegrationTests2/targets/variety/cabal.project
tests/IntegrationTests2/targets/variety/p.cabal
-- END gen-extra-source-files
source-repository head
......
This diff is collapsed.
name: p
version: 0.1
build-type: Simple
cabal-version: >= 1.2
library
exposed-modules: Q
build-depends: base, filepath
buildable: False
executable buildable-false
main-is: Main.hs
buildable: False
test-suite solver-disabled
type: exitcode-stdio-1.0
main-is: Test.hs
build-depends: a-package-that-does-not-exist
benchmark user-disabled
type: exitcode-stdio-1.0
main-is: Test.hs
name: p
version: 0.1
build-type: Simple
cabal-version: >= 1.10
benchmark solver-disabled
type: exitcode-stdio-1.0
main-is: Test.hs
build-depends: a-package-that-does-not-exist
benchmark user-disabled
type: exitcode-stdio-1.0
main-is: Test.hs
build-depends: base
name: q
version: 0.1
build-type: Simple
cabal-version: >= 1.10
benchmark buildable-false
type: exitcode-stdio-1.0
main-is: Main.hs
buildable: False
name: p
version: 0.1
build-type: Simple
cabal-version: >= 1.2
name: p
version: 0.1
build-type: Simple
cabal-version: >= 1.2
executable p
main-is: P.hs
build-depends: base
buildable: False
name: q
version: 0.1
build-type: Simple
cabal-version: >= 1.2
executable q
main-is: Q.hs
build-depends: base
buildable: False
name: p
version: 0.1
build-type: Simple
cabal-version: >= 1.2
library
exposed-modules: P
build-depends: base
buildable: False
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