Merge pull request #10584 from cabalism/make/lint-rules
[cabal.git] / cabal-testsuite / cabal-testsuite.cabal
blob0f3383af38a1e5728c7f401d32921221c13fac94
1 cabal-version: 2.2
2 name:          cabal-testsuite
3 version:       3
4 copyright:     2003-2024, Cabal Development Team (see AUTHORS file)
5 license:       BSD-3-Clause
6 license-file:  LICENSE
7 author:        Cabal Development Team <cabal-devel@haskell.org>
8 maintainer:    cabal-devel@haskell.org
9 homepage:      http://www.haskell.org/cabal/
10 bug-reports:   https://github.com/haskell/cabal/issues
11 synopsis:      Test suite for Cabal and cabal-install
12 description:
13   This package defines a shared test suite for Cabal and cabal-install.
14 category:       Distribution
15 build-type:     Custom
17 extra-source-files:
18   README.md
20 source-repository head
21   type:     git
22   location: https://github.com/haskell/cabal/
23   subdir:   cabal-testsuite
25 common shared
26   default-language: Haskell2010
28   build-depends:
29     , base >= 4.11 && < 4.22
30     -- this needs to match the in-tree lib:Cabal version
31     , Cabal ^>= 3.15.0.0
33   ghc-options:
34     -Wall
35     -fwarn-tabs
36     -fwarn-incomplete-uni-patterns
37     -fno-warn-unticked-promoted-constructors
40 library
41   import: shared
43   hs-source-dirs: src
44   exposed-modules:
45     Test.Cabal.CheckArMetadata
46     Test.Cabal.DecodeShowBuildInfo
47     Test.Cabal.Monad
48     Test.Cabal.OutputNormalizer
49     Test.Cabal.Plan
50     Test.Cabal.Prelude
51     Test.Cabal.Run
52     Test.Cabal.Script
53     Test.Cabal.Server
54     Test.Cabal.TestCode
55     Test.Cabal.Workdir
57   other-modules:
58     Test.Cabal.ScriptEnv0
59   autogen-modules:
60     Test.Cabal.ScriptEnv0
62   build-depends:
63     , Cabal-tests
64     , aeson                 ^>= 1.4.2.0 || ^>=1.5.0.0 || ^>= 2.0.0.0 || ^>= 2.1.0.0 || ^>= 2.2.1.0
65     , async                 ^>= 2.2.1
66     , base16-bytestring     ^>= 0.1.1.5 || ^>= 1.0
67     , bytestring            ^>= 0.10.0.2 || ^>= 0.11.0.0 || ^>= 0.12.0.0
68     , containers            ^>= 0.5.0.0 || ^>= 0.6.0.1 || ^>= 0.7
69     , cryptohash-sha256     ^>= 0.11.101.0
70     , directory             ^>= 1.2.0.1 || ^>= 1.3.0.0
71     , exceptions            ^>= 0.10.0
72     , filepath              ^>= 1.3.0.1 || ^>= 1.4.0.0 || ^>= 1.5.0.0
73     , Glob                  ^>= 0.10.2
74     , network-wait          ^>= 0.1.2.0 || ^>= 0.2.0.0
75     , optparse-applicative  ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0 || ^>= 0.17.0.0 || ^>= 0.18.1.0
76     , process               ^>= 1.2.1.0 || ^>= 1.4.2.0 || ^>= 1.6.1.0
77     , regex-base            ^>= 0.94.0.1
78     , regex-tdfa            ^>= 1.2.3.1 || ^>=1.3.1.0
79     , retry                 ^>= 0.9.1.0
80     , array                 ^>= 0.4.0.1 || ^>= 0.5.0.0
81     , text                  ^>= 1.2.3.1 || ^>= 2.0.1   || ^>= 2.1
82     , transformers          ^>= 0.3.0.0 || ^>= 0.4.2.0 || ^>= 0.5.2.0 || ^>= 0.6.0.2
84   if !os(windows)
85     build-depends:
86       , unix                ^>= 2.6.0.0 || ^>= 2.7.0.0 || ^>= 2.8.0.0
87   else
88     build-depends:
89       , Win32
91 executable cabal-tests
92   import: shared
93   main-is: cabal-tests.hs
94   hs-source-dirs: main
95   ghc-options: -threaded -rtsopts
96   -- Make sure these are built before the executable is run
97   build-tool-depends: cabal-testsuite:test-runtime-deps
98   build-depends:
99     , cabal-testsuite
100     -- constraints inherited via lib:cabal-testsuite component
101     , async
102     , filepath
103     , optparse-applicative
104     , process
105     -- dependencies specific to exe:cabal-tests
106     , clock                 ^>= 0.7.2 || ^>=0.8
107     , directory
108     , tasty
109     , containers
111   build-tool-depends: cabal-testsuite:setup
112   default-extensions: TypeOperators
114 -- this executable is needed by lib:cabal-testsuite
115 executable setup
116   import: shared
117   main-is: Setup.simple.hs
119 -- This executable component is used to describe the runtime dependencies of
120 -- the tests. The Main.hs file and resulting executable are not useful in any way.
122 -- Ideally this would be an empty library, but because build-type: Custom, we can't
123 -- have sublibraries.
125 -- If you require an external dependency for a test it must be listed here.
126 executable test-runtime-deps
127   default-language: Haskell2010
128   -- Apart from base that is a compile-time dependency, the rest are runtime dependencies
129   build-depends:
130     , Cabal
131     , Cabal-syntax
132     , Cabal-hooks
133     , base
134     , bytestring
135     , cabal-testsuite
136     , containers
137     , directory
138     , exceptions
139     , filepath
140     , process
141     , time
142     , transformers
143   main-is: static/Main.hs
144   if !os(windows)
145     build-depends: unix
146   else
147     build-depends: Win32
149 custom-setup
150   -- we only depend on even stable releases of lib:Cabal
151   -- and must match the release used in validate.yml (see
152   -- https://github.com/haskell/cabal/pull/10251)
153   setup-depends: Cabal ^>= 3.12.1,
154                  Cabal-syntax ^>= 3.12.1,
155                  base, filepath, directory