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