Add skipping installed tests
[cabal.git] / cabal-install / cabal-install.cabal
blob373152e8f6403dfaceae7fb1e5c455522cb7d6f7
1 Cabal-Version:      2.2
3 Name:               cabal-install
4 Version:            3.11.0.0
5 Synopsis:           The command-line interface for Cabal and Hackage.
6 Description:
7     The \'cabal\' command-line program simplifies the process of managing
8     Haskell software by automating the fetching, configuration, compilation
9     and installation of Haskell libraries and programs.
10 homepage:           http://www.haskell.org/cabal/
11 bug-reports:        https://github.com/haskell/cabal/issues
12 License:            BSD-3-Clause
13 License-File:       LICENSE
14 Author:             Cabal Development Team (see AUTHORS file)
15 Maintainer:         Cabal Development Team <cabal-devel@haskell.org>
16 Copyright:          2003-2023, Cabal Development Team
17 Category:           Distribution
18 Build-type:         Simple
19 Extra-Source-Files:
20   README.md
21   bash-completion/cabal
22   changelog
24 source-repository head
25   type:     git
26   location: https://github.com/haskell/cabal/
27   subdir:   cabal-install
29 Flag native-dns
30   description:
31     Enable use of the [resolv](https://hackage.haskell.org/package/resolv)
32     & [windns](https://hackage.haskell.org/package/windns) packages for performing DNS lookups
33   default:      True
34   manual:       True
36 Flag lukko
37   description:  Use @lukko@ for file-locking
38   default:      True
39   manual:       True
41 common warnings
42     ghc-options: -Wall -Wcompat -Wnoncanonical-monad-instances -Wincomplete-uni-patterns -Wincomplete-record-updates
43     if impl(ghc < 8.8)
44       ghc-options: -Wnoncanonical-monadfail-instances
45     if impl(ghc >=9.0)
46       -- Warning: even though introduced with GHC 8.10, -Wunused-packages
47       -- gives false positives with GHC 8.10.
48       ghc-options: -Wunused-packages
50 common base-dep
51     build-depends: base >=4.10 && <4.20
53 common cabal-dep
54     build-depends: Cabal ^>=3.11
56 common cabal-syntax-dep
57     build-depends: Cabal-syntax ^>=3.11
59 common cabal-install-solver-dep
60     build-depends: cabal-install-solver ^>=3.11
62 library
63     import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
64     default-language: Haskell2010
65     default-extensions: TypeOperators
67     hs-source-dirs:   src
68     other-modules:
69         Paths_cabal_install
70     exposed-modules:
71         -- this modules are moved from Cabal
72         -- they are needed for as long until cabal-install moves to parsec parser
73         Distribution.Deprecated.ParseUtils
74         Distribution.Deprecated.ReadP
75         Distribution.Deprecated.ViewAsFieldDescr
77         Distribution.Client.BuildReports.Anonymous
78         Distribution.Client.BuildReports.Lens
79         Distribution.Client.BuildReports.Storage
80         Distribution.Client.BuildReports.Types
81         Distribution.Client.BuildReports.Upload
82         Distribution.Client.Check
83         Distribution.Client.CmdBench
84         Distribution.Client.CmdBuild
85         Distribution.Client.CmdClean
86         Distribution.Client.CmdConfigure
87         Distribution.Client.CmdErrorMessages
88         Distribution.Client.CmdExec
89         Distribution.Client.CmdFreeze
90         Distribution.Client.CmdHaddock
91         Distribution.Client.CmdHaddockProject
92         Distribution.Client.CmdInstall
93         Distribution.Client.CmdInstall.ClientInstallFlags
94         Distribution.Client.CmdInstall.ClientInstallTargetSelector
95         Distribution.Client.CmdLegacy
96         Distribution.Client.CmdListBin
97         Distribution.Client.CmdOutdated
98         Distribution.Client.CmdRepl
99         Distribution.Client.CmdRun
100         Distribution.Client.CmdSdist
101         Distribution.Client.CmdTest
102         Distribution.Client.CmdUpdate
103         Distribution.Client.Compat.Directory
104         Distribution.Client.Compat.ExecutablePath
105         Distribution.Client.Compat.Orphans
106         Distribution.Client.Compat.Prelude
107         Distribution.Client.Compat.Semaphore
108         Distribution.Client.Compat.Tar
109         Distribution.Client.Config
110         Distribution.Client.Configure
111         Distribution.Client.Dependency
112         Distribution.Client.Dependency.Types
113         Distribution.Client.DistDirLayout
114         Distribution.Client.Errors
115         Distribution.Client.Fetch
116         Distribution.Client.FetchUtils
117         Distribution.Client.FileMonitor
118         Distribution.Client.Freeze
119         Distribution.Client.GZipUtils
120         Distribution.Client.GenBounds
121         Distribution.Client.Get
122         Distribution.Client.Glob
123         Distribution.Client.GlobalFlags
124         Distribution.Client.Haddock
125         Distribution.Client.HashValue
126         Distribution.Client.HttpUtils
127         Distribution.Client.IndexUtils
128         Distribution.Client.IndexUtils.ActiveRepos
129         Distribution.Client.IndexUtils.IndexState
130         Distribution.Client.IndexUtils.Timestamp
131         Distribution.Client.Init
132         Distribution.Client.Init.Defaults
133         Distribution.Client.Init.FileCreators
134         Distribution.Client.Init.FlagExtractors
135         Distribution.Client.Init.Format
136         Distribution.Client.Init.Interactive.Command
137         Distribution.Client.Init.NonInteractive.Command
138         Distribution.Client.Init.NonInteractive.Heuristics
139         Distribution.Client.Init.Licenses
140         Distribution.Client.Init.Prompt
141         Distribution.Client.Init.Simple
142         Distribution.Client.Init.Types
143         Distribution.Client.Init.Utils
144         Distribution.Client.Install
145         Distribution.Client.InstallPlan
146         Distribution.Client.InstallSymlink
147         Distribution.Client.JobControl
148         Distribution.Client.List
149         Distribution.Client.Main
150         Distribution.Client.Manpage
151         Distribution.Client.ManpageFlags
152         Distribution.Client.Nix
153         Distribution.Client.NixStyleOptions
154         Distribution.Client.PackageHash
155         Distribution.Client.ParseUtils
156         Distribution.Client.ProjectBuilding
157         Distribution.Client.ProjectBuilding.UnpackedPackage
158         Distribution.Client.ProjectBuilding.PackageFileMonitor
159         Distribution.Client.ProjectBuilding.Types
160         Distribution.Client.ProjectConfig
161         Distribution.Client.ProjectConfig.Legacy
162         Distribution.Client.ProjectConfig.Types
163         Distribution.Client.ProjectFlags
164         Distribution.Client.ProjectOrchestration
165         Distribution.Client.ProjectPlanOutput
166         Distribution.Client.ProjectPlanning
167         Distribution.Client.ProjectPlanning.SetupPolicy
168         Distribution.Client.ProjectPlanning.Types
169         Distribution.Client.RebuildMonad
170         Distribution.Client.Reconfigure
171         Distribution.Client.ReplFlags
172         Distribution.Client.Run
173         Distribution.Client.Sandbox
174         Distribution.Client.Sandbox.PackageEnvironment
175         Distribution.Client.SavedFlags
176         Distribution.Client.ScriptUtils
177         Distribution.Client.Security.DNS
178         Distribution.Client.Security.HTTP
179         Distribution.Client.Setup
180         Distribution.Client.SetupWrapper
181         Distribution.Client.Signal
182         Distribution.Client.SolverInstallPlan
183         Distribution.Client.SourceFiles
184         Distribution.Client.SrcDist
185         Distribution.Client.Store
186         Distribution.Client.Tar
187         Distribution.Client.TargetProblem
188         Distribution.Client.TargetSelector
189         Distribution.Client.Targets
190         Distribution.Client.Types
191         Distribution.Client.Types.AllowNewer
192         Distribution.Client.Types.BuildResults
193         Distribution.Client.Types.ConfiguredId
194         Distribution.Client.Types.ConfiguredPackage
195         Distribution.Client.Types.Credentials
196         Distribution.Client.Types.InstallMethod
197         Distribution.Client.Types.OverwritePolicy
198         Distribution.Client.Types.PackageLocation
199         Distribution.Client.Types.PackageSpecifier
200         Distribution.Client.Types.ReadyPackage
201         Distribution.Client.Types.Repo
202         Distribution.Client.Types.RepoName
203         Distribution.Client.Types.SourcePackageDb
204         Distribution.Client.Types.SourceRepo
205         Distribution.Client.Types.WriteGhcEnvironmentFilesPolicy
206         Distribution.Client.Upload
207         Distribution.Client.Utils
208         Distribution.Client.Utils.Json
209         Distribution.Client.Utils.Parsec
210         Distribution.Client.VCS
211         Distribution.Client.Version
212         Distribution.Client.Win32SelfUpgrade
214     build-depends:
215         async      >= 2.0      && < 2.3,
216         array      >= 0.4      && < 0.6,
217         base16-bytestring >= 0.1.1 && < 1.1.0.0,
218         binary     >= 0.7.3    && < 0.9,
219         bytestring >= 0.10.6.0 && < 0.13,
220         containers >= 0.5.6.2  && < 0.8,
221         cryptohash-sha256 >= 0.11 && < 0.12,
222         directory  >= 1.3.7.0  && < 1.4,
223         echo       >= 0.1.3    && < 0.2,
224         edit-distance >= 0.2.2 && < 0.3,
225         exceptions >= 0.10.4   && < 0.11,
226         filepath   >= 1.4.0.0  && < 1.6,
227         hashable   >= 1.0      && < 1.5,
228         HTTP       >= 4000.1.5 && < 4000.5,
229         mtl        >= 2.0      && < 2.4,
230         network-uri >= 2.6.0.2 && < 2.7,
231         pretty     >= 1.1      && < 1.2,
232         process    >= 1.2.3.0  && < 1.7,
233         random     >= 1.2      && < 1.3,
234         stm        >= 2.0      && < 2.6,
235         tar        >= 0.5.0.3  && < 0.7,
236         time       >= 1.5.0.1  && < 1.13,
237         zlib       >= 0.5.3    && < 0.7,
238         hackage-security >= 0.6.2.0 && < 0.7,
239         text       >= 1.2.3    && < 1.3 || >= 2.0 && < 2.2,
240         parsec     >= 3.1.13.0 && < 3.2,
241         regex-base  >= 0.94.0.0 && <0.95,
242         regex-posix >= 0.96.0.0 && <0.97,
243         safe-exceptions >= 0.1.7.0 && < 0.2,
244         semaphore-compat >= 1.0.0 && < 1.1
246     if flag(native-dns)
247       if os(windows)
248         build-depends: windns      >= 0.1.0 && < 0.2
249       else
250         build-depends: resolv      >= 0.1.1 && < 0.3
252     if os(windows)
253       -- newer directory for symlinks
254       build-depends: Win32 >= 2.8 && < 3, directory >=1.3.1.0
255     else
256       build-depends: unix >= 2.5 && < 2.9
258     if flag(lukko)
259       build-depends: lukko >= 0.1 && <0.2
261     -- pull in process version with fixed waitForProcess error
262     if impl(ghc >=8.2)
263       build-depends: process >= 1.6.15.0
266 executable cabal
267     import: warnings, base-dep
268     main-is: Main.hs
269     hs-source-dirs: main
270     default-language: Haskell2010
272     ghc-options: -rtsopts -threaded
274     -- On AIX, some legacy BSD operations such as flock(2) are provided by libbsd.a
275     if os(aix)
276         extra-libraries: bsd
278     build-depends:
279         cabal-install
281 -- Small, fast running tests.
283 test-suite unit-tests
284     import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
285     default-language: Haskell2010
286     default-extensions: TypeOperators
287     ghc-options: -rtsopts -threaded
289     type: exitcode-stdio-1.0
290     main-is: UnitTests.hs
291     hs-source-dirs: tests
292     other-modules:
293       UnitTests.Distribution.Client.ArbitraryInstances
294       UnitTests.Distribution.Client.BuildReport
295       UnitTests.Distribution.Client.Configure
296       UnitTests.Distribution.Client.FetchUtils
297       UnitTests.Distribution.Client.Get
298       UnitTests.Distribution.Client.Glob
299       UnitTests.Distribution.Client.GZipUtils
300       UnitTests.Distribution.Client.IndexUtils
301       UnitTests.Distribution.Client.IndexUtils.Timestamp
302       UnitTests.Distribution.Client.Init
303       UnitTests.Distribution.Client.Init.Golden
304       UnitTests.Distribution.Client.Init.Interactive
305       UnitTests.Distribution.Client.Init.NonInteractive
306       UnitTests.Distribution.Client.Init.Simple
307       UnitTests.Distribution.Client.Init.Utils
308       UnitTests.Distribution.Client.Init.FileCreators
309       UnitTests.Distribution.Client.InstallPlan
310       UnitTests.Distribution.Client.JobControl
311       UnitTests.Distribution.Client.ProjectConfig
312       UnitTests.Distribution.Client.ProjectPlanning
313       UnitTests.Distribution.Client.Store
314       UnitTests.Distribution.Client.Tar
315       UnitTests.Distribution.Client.Targets
316       UnitTests.Distribution.Client.TreeDiffInstances
317       UnitTests.Distribution.Client.UserConfig
318       UnitTests.Distribution.Solver.Modular.Builder
319       UnitTests.Distribution.Solver.Modular.RetryLog
320       UnitTests.Distribution.Solver.Modular.Solver
321       UnitTests.Distribution.Solver.Modular.DSL
322       UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
323       UnitTests.Distribution.Solver.Modular.WeightedPSQ
324       UnitTests.Distribution.Solver.Types.OptionalStanza
325       UnitTests.Options
327     build-depends:
328           array,
329           bytestring,
330           cabal-install,
331           Cabal-tree-diff,
332           Cabal-QuickCheck,
333           Cabal-tests,
334           containers,
335           directory,
336           filepath,
337           mtl,
338           network-uri >= 2.6.2.0 && <2.7,
339           random,
340           tar,
341           time,
342           zlib,
343           tasty >= 1.2.3 && <1.6,
344           tasty-golden >=2.3.1.1 && <2.4,
345           tasty-quickcheck,
346           tasty-hunit >= 0.10,
347           tree-diff,
348           QuickCheck >= 2.14.3 && <2.15
351 -- Tests to run with a limited stack and heap size
352 -- The test suite name must be keep short cause a longer one
353 -- could make the build generating paths which exceeds the windows
354 -- max path limit (still a problem for some ghc versions)
355 test-suite mem-use-tests
356   import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
357   type: exitcode-stdio-1.0
358   main-is: MemoryUsageTests.hs
359   hs-source-dirs: tests
360   default-language: Haskell2010
362   ghc-options: -threaded -rtsopts "-with-rtsopts=-M16M -K1K"
364   other-modules:
365     UnitTests.Distribution.Solver.Modular.DSL
366     UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
367     UnitTests.Distribution.Solver.Modular.MemoryUsage
368     UnitTests.Options
370   build-depends:
371         cabal-install,
372         containers,
373         tasty >= 1.2.3 && <1.5,
374         tasty-hunit >= 0.10
377 -- Integration tests that use the cabal-install code directly
378 -- but still build whole projects
379 test-suite integration-tests2
380   import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
381   ghc-options: -rtsopts -threaded
382   type: exitcode-stdio-1.0
383   main-is: IntegrationTests2.hs
384   hs-source-dirs: tests
385   default-language: Haskell2010
387   build-depends:
388         bytestring,
389         cabal-install,
390         containers,
391         directory,
392         filepath,
393         tasty >= 1.2.3 && <1.5,
394         tasty-hunit >= 0.10,
395         tagged
397 test-suite long-tests
398   import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
399   ghc-options: -rtsopts -threaded
400   type: exitcode-stdio-1.0
401   hs-source-dirs: tests
402   main-is: LongTests.hs
403   default-language: Haskell2010
405   other-modules:
406     UnitTests.Distribution.Client.ArbitraryInstances
407     UnitTests.Distribution.Client.Described
408     UnitTests.Distribution.Client.DescribedInstances
409     UnitTests.Distribution.Client.FileMonitor
410     UnitTests.Distribution.Client.VCS
411     UnitTests.Distribution.Solver.Modular.DSL
412     UnitTests.Distribution.Solver.Modular.QuickCheck
413     UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
414     UnitTests.Options
416   build-depends:
417         Cabal-QuickCheck,
418         Cabal-described,
419         Cabal-tests,
420         cabal-install,
421         containers,
422         directory,
423         filepath,
424         hashable,
425         mtl,
426         network-uri >= 2.6.2.0 && <2.7,
427         random,
428         tagged,
429         tasty >= 1.2.3 && <1.5,
430         tasty-expected-failure,
431         tasty-hunit >= 0.10,
432         tasty-quickcheck,
433         QuickCheck >= 2.14 && <2.15,
434         pretty-show >= 1.6.15