Switch to using the I and V to match other naming
[cabal.git] / cabal-testsuite / cabal-testsuite.cabal
blob677fcdce098001af95dd2de23d72e573323d3ce3
1 cabal-version: 2.2
2 name:          cabal-testsuite
3 version:       3
4 copyright:     2003-2023, 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.9 && <4.20
30     -- this needs to match the in-tree lib:Cabal version
31     , Cabal ^>= 3.11.0.0
32     , Cabal-syntax ^>= 3.11.0.0
33     , Cabal-tests
35   ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
38 library
39   import: shared
41   hs-source-dirs: src
42   exposed-modules:
43     Test.Cabal.CheckArMetadata
44     Test.Cabal.DecodeShowBuildInfo
45     Test.Cabal.Monad
46     Test.Cabal.OutputNormalizer
47     Test.Cabal.Plan
48     Test.Cabal.Prelude
49     Test.Cabal.Run
50     Test.Cabal.Script
51     Test.Cabal.Server
52     Test.Cabal.TestCode
53     Test.Cabal.Workdir
55   other-modules:
56     Test.Cabal.ScriptEnv0
57   autogen-modules:
58     Test.Cabal.ScriptEnv0
60   build-depends:
61     , aeson                 ^>= 1.4.2.0 || ^>=1.5.0.0 || ^>= 2.0.0.0 || ^>= 2.1.0.0 || ^>= 2.2.1.0
62     , async                 ^>= 2.2.1
63     , attoparsec            ^>= 0.13.2.2 || ^>=0.14.1
64     , base16-bytestring     ^>= 0.1.1.5 || ^>= 1.0
65     , bytestring            ^>= 0.10.0.2 || ^>= 0.11.0.0 || ^>= 0.12.0.0
66     , containers            ^>= 0.5.0.0 || ^>= 0.6.0.1
67     , cryptohash-sha256     ^>= 0.11.101.0
68     , directory             ^>= 1.2.0.1 || ^>= 1.3.0.0
69     , exceptions            ^>= 0.10.0
70     , filepath              ^>= 1.3.0.1 || ^>= 1.4.0.0 || ^>= 1.5.0.0
71     , network-wait          ^>= 0.1.2.0 || ^>= 0.2.0.0
72     , optparse-applicative  ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0 || ^>= 0.17.0.0 || ^>= 0.18.1.0
73     , process               ^>= 1.2.1.0 || ^>= 1.4.2.0 || ^>= 1.6.1.0
74     , regex-base            ^>= 0.94.0.1
75     , regex-tdfa            ^>= 1.2.3.1 || ^>=1.3.1.0
76     , retry                 ^>= 0.9.1.0
77     , array                 ^>= 0.4.0.1 || ^>= 0.5.0.0
78     , temporary             ^>= 1.3
79     , text                  ^>= 1.2.3.1 || ^>= 2.0.1   || ^>= 2.1
80     , transformers          ^>= 0.3.0.0 || ^>= 0.4.2.0 || ^>= 0.5.2.0 || ^>= 0.6.0.2
82   if !os(windows)
83     build-depends:
84       , unix                ^>= 2.6.0.0 || ^>= 2.7.0.0 || ^>= 2.8.0.0
85   else
86     build-depends:
87       , Win32
89 executable cabal-tests
90   import: shared
91   main-is: cabal-tests.hs
92   hs-source-dirs: main
93   ghc-options: -threaded
94   -- Make sure these are built before the executable is run
95   build-tool-depends: cabal-testsuite:test-runtime-deps
96   build-depends:
97     , cabal-testsuite
98     -- constraints inherited via lib:cabal-testsuite component
99     , async
100     , exceptions
101     , filepath
102     , optparse-applicative
103     , process
104     , transformers
105     -- dependencies specific to exe:cabal-tests
106     , clock                 ^>= 0.7.2 || ^>=0.8
108   build-tool-depends: cabal-testsuite:setup
109   default-extensions: TypeOperators
111 -- this executable is needed by lib:cabal-testsuite
112 executable setup
113   import: shared
114   main-is: Setup.simple.hs
116 -- This executable component is used to describe the runtime dependencies of
117 -- the tests. The Main.hs file and resulting executable are not useful in any way.
119 -- Ideally this would be an empty library, but because build-type: Custom, we can't
120 -- have sublibraries.
122 -- If you require an external dependency for a test it must be listed here.
123 executable test-runtime-deps
124   default-language: Haskell2010
125   build-depends: cabal-testsuite,
126                  base,
127                  directory,
128                  Cabal,
129                  Cabal-syntax,
130                  filepath,
131                  transformers,
132                  bytestring,
133                  time,
134                  process,
135                  exceptions
136   main-is: static/Main.hs
137   if !os(windows)
138     build-depends: unix
139   else
140     build-depends:
141       , Win32
143 custom-setup
144   -- we only depend on even stable releases of lib:Cabal
145   -- and due to Custom complexity and ConstraintSetupCabalMaxVersion
146   -- it has to be the latest release version plus
147   -- you have to use the latest cabal-install release
148   setup-depends: Cabal == 3.10.*,
149                  Cabal-syntax == 3.10.*,
150                  base, filepath, directory