on 3feeec2 help sign in
streamly/test/streamly-tests.cabal
368 lines 10 kB history raw
1cabal-version: 2.2
2name: streamly-tests
3version: 0.0.0
4synopsis: Tests for streamly
5description: See streamly-benchmarks for the reason why we use a separate
6 package for tests.
8flag fusion-plugin
9 description: Use fusion plugin for benchmarks and executables
10 manual: True
11 default: False
13flag limit-build-mem
14 description: Limits memory when building the executables
15 manual: True
16 default: False
18flag dev
19 description: Development build
20 manual: True
21 default: False
23flag has-llvm
24 description: Use llvm backend for better performance
25 manual: True
26 default: False
28flag opt
29 description: off=-O0 (faster builds), on=-O2
30 manual: True
31 default: True
33-------------------------------------------------------------------------------
34-- Common stanzas
35-------------------------------------------------------------------------------
37common compile-options
38 default-language: Haskell2010
40 if os(darwin)
41 cpp-options: -DCABAL_OS_DARWIN
43 if os(linux)
44 cpp-options: -DCABAL_OS_LINUX
46 if os(windows)
47 cpp-options: -DCABAL_OS_WINDOWS
49 if flag(dev)
50 cpp-options: -DDEVBUILD
52 ghc-options: -Wall
53 -Wcompat
54 -Wunrecognised-warning-flags
55 -Widentities
56 -Wincomplete-record-updates
57 -Wincomplete-uni-patterns
58 -Wredundant-constraints
59 -Wnoncanonical-monad-instances
60 -Rghc-timing
61 -fno-ignore-asserts
63 if flag(has-llvm)
64 ghc-options: -fllvm
66 if flag(dev)
67 ghc-options: -Wmissed-specialisations
68 -Wall-missed-specialisations
70 if flag(limit-build-mem)
71 ghc-options: +RTS -M512M -RTS
73common default-extensions
74 default-extensions:
75 BangPatterns
76 CApiFFI
77 CPP
78 ConstraintKinds
79 DeriveDataTypeable
80 DeriveGeneric
81 DeriveTraversable
82 ExistentialQuantification
83 FlexibleContexts
84 FlexibleInstances
85 GeneralizedNewtypeDeriving
86 InstanceSigs
87 KindSignatures
88 LambdaCase
89 MagicHash
90 MultiParamTypeClasses
91 PatternSynonyms
92 RankNTypes
93 RecordWildCards
94 ScopedTypeVariables
95 TupleSections
96 TypeFamilies
97 ViewPatterns
99 -- MonoLocalBinds, enabled by TypeFamilies, causes performance
100 -- regressions. Disable it. This must come after TypeFamilies,
101 -- otherwise TypeFamilies will enable it again.
102 NoMonoLocalBinds
104 -- UndecidableInstances -- Does not show any perf impact
105 -- UnboxedTuples -- interferes with (#.)
107common threading-options
108 ghc-options: -threaded
109 -with-rtsopts=-N
111common optimization-options
112 if flag(opt) || flag(fusion-plugin)
113 ghc-options: -O2
114 -fdicts-strict
115 -fmax-worker-args=16
116 -fspec-constr-recursive=16
117 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
118 ghc-options: -fplugin Fusion.Plugin
119 else
120 ghc-options: -O0
122common test-dependencies
123 build-depends:
124 streamly
125 , base >= 4.9 && < 5
126 , containers >= 0.5 && < 0.7
127 , exceptions >= 0.8 && < 0.11
128 , ghc
129 , hspec >= 2.0 && < 3
130 , mtl >= 2.2 && < 3
131 , random >= 1.0.0 && < 2
132 , transformers >= 0.4 && < 0.6
133 , QuickCheck >= 2.13 && < 2.15
134 , directory >= 1.2.2 && < 1.4
135 , filepath >= 1.4.1 && < 1.5
136 , temporary >= 1.3 && < 1.4
137 , network >= 3.1 && < 3.2
139 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
140 build-depends:
141 fusion-plugin >= 0.2 && < 0.3
143-------------------------------------------------------------------------------
144-- Library
145-------------------------------------------------------------------------------
147common lib-options
148 import: compile-options
149 , optimization-options
150 , default-extensions
151 , test-dependencies
153library
154 import: lib-options, test-dependencies
155 hs-source-dirs: lib
156 exposed-modules: Streamly.Test.Common
157 , Streamly.Test.Prelude.Common
158 if flag(limit-build-mem)
159 ghc-options: +RTS -M1500M -RTS
162-------------------------------------------------------------------------------
163-- Test suite options
164-------------------------------------------------------------------------------
166common test-options
167 import: lib-options
168 , threading-options
169 ghc-options: -rtsopts
170 include-dirs: .
171 build-depends: streamly-tests
173common always-optimized
174 import: compile-options
175 , threading-options
176 , default-extensions
177 , test-dependencies
178 ghc-options: -O2
179 -fdicts-strict
180 -fmax-worker-args=16
181 -fspec-constr-recursive=16
182 -rtsopts
183 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
184 ghc-options: -fplugin Fusion.Plugin
186-------------------------------------------------------------------------------
187-- Test suites in sorted order
188-------------------------------------------------------------------------------
190test-suite Data.List
191 import: test-options
192 type: exitcode-stdio-1.0
193 main-is: Streamly/Test/Data/List.hs
194 cpp-options: -DUSE_STREAMLY_LIST
196test-suite Data.List.Base
197 import: test-options
198 type: exitcode-stdio-1.0
199 main-is: Streamly/Test/Data/List.hs
201test-suite Data.Array
202 import: test-options
203 type: exitcode-stdio-1.0
204 main-is: Streamly/Test/Data/Array.hs
205 ghc-options: -main-is Streamly.Test.Data.Array.main
207test-suite Data.Array.Prim
208 import: test-options
209 type: exitcode-stdio-1.0
210 main-is: Streamly/Test/Data/Array/Prim.hs
211 ghc-options: -main-is Streamly.Test.Data.Array.Prim.main
213test-suite Data.Array.Prim.Pinned
214 import: test-options
215 type: exitcode-stdio-1.0
216 main-is: Streamly/Test/Data/Array/Prim/Pinned.hs
217 ghc-options: -main-is Streamly.Test.Data.Array.Prim.Pinned.main
219test-suite Data.Array.Foreign
220 import: test-options
221 type: exitcode-stdio-1.0
222 main-is: Streamly/Test/Data/Array/Foreign.hs
223 ghc-options: -main-is Streamly.Test.Data.Array.Foreign.main
225test-suite Data.Fold
226 import: test-options
227 type: exitcode-stdio-1.0
228 main-is: Streamly/Test/Data/Fold.hs
230test-suite Data.Parser
231 import: test-options
232 type: exitcode-stdio-1.0
233 main-is: Streamly/Test/Data/Parser.hs
234 if flag(limit-build-mem)
235 ghc-options: +RTS -M1000M -RTS
237test-suite Data.Parser.ParserD
238 import: test-options
239 type: exitcode-stdio-1.0
240 main-is: Streamly/Test/Data/Parser/ParserD.hs
241 if flag(limit-build-mem)
242 ghc-options: +RTS -M1000M -RTS
244test-suite Data.SmallArray
245 import: test-options
246 type: exitcode-stdio-1.0
247 main-is: Streamly/Test/Data/SmallArray.hs
248 ghc-options: -main-is Streamly.Test.Data.SmallArray.main
250test-suite Data.Unfold
251 import: test-options
252 type: exitcode-stdio-1.0
253 main-is: Streamly/Test/Data/Unfold.hs
255test-suite FileSystem.Event
256 import: test-options
257 type: exitcode-stdio-1.0
258 main-is: Streamly/Test/FileSystem/Event.hs
259 if os(darwin)
260 buildable: False
262test-suite FileSystem.Handle
263 import: test-options
264 type: exitcode-stdio-1.0
265 main-is: Streamly/Test/FileSystem/Handle.hs
266 ghc-options: -main-is Streamly.Test.FileSystem.Handle.main
268test-suite Network.Inet.TCP
269 import: test-options
270 type: exitcode-stdio-1.0
271 main-is: Streamly/Test/Network/Inet/TCP.hs
273test-suite Network.Socket
274 import: test-options
275 type: exitcode-stdio-1.0
276 main-is: Streamly/Test/Network/Socket.hs
278test-suite Prelude
279 import: test-options
280 type: exitcode-stdio-1.0
281 main-is: Streamly/Test/Prelude.hs
282 ghc-options: -main-is Streamly.Test.Prelude.main
284test-suite Prelude.Ahead
285 import: test-options
286 type: exitcode-stdio-1.0
287 main-is: Streamly/Test/Prelude/Ahead.hs
288 ghc-options: -main-is Streamly.Test.Prelude.Ahead.main
290test-suite Prelude.Async
291 import: test-options
292 type: exitcode-stdio-1.0
293 main-is: Streamly/Test/Prelude/Async.hs
294 ghc-options: -main-is Streamly.Test.Prelude.Async.main
296test-suite Prelude.Concurrent
297 import: test-options
298 type: exitcode-stdio-1.0
299 main-is: Streamly/Test/Prelude/Concurrent.hs
300 ghc-options: -main-is Streamly.Test.Prelude.Concurrent.main
301 if flag(limit-build-mem)
302 ghc-options: +RTS -M2000M -RTS
304test-suite Prelude.Fold
305 import: test-options
306 type: exitcode-stdio-1.0
307 main-is: Streamly/Test/Prelude/Fold.hs
308 ghc-options: -main-is Streamly.Test.Prelude.Fold.main
310test-suite Prelude.Parallel
311 import: test-options
312 type: exitcode-stdio-1.0
313 main-is: Streamly/Test/Prelude/Parallel.hs
314 ghc-options: -main-is Streamly.Test.Prelude.Parallel.main
316test-suite Prelude.Rate
317 import:always-optimized
318 type: exitcode-stdio-1.0
319 main-is: Streamly/Test/Prelude/Rate.hs
320 ghc-options: -main-is Streamly.Test.Prelude.Rate.main
321 if flag(dev)
322 buildable: True
323 else
324 buildable: False
326test-suite Prelude.Serial
327 import: test-options
328 type: exitcode-stdio-1.0
329 main-is: Streamly/Test/Prelude/Serial.hs
330 ghc-options: -main-is Streamly.Test.Prelude.Serial.main
331 if flag(limit-build-mem)
332 ghc-options: +RTS -M1500M -RTS
335test-suite Prelude.WAsync
336 import: test-options
337 type: exitcode-stdio-1.0
338 main-is: Streamly/Test/Prelude/WAsync.hs
339 ghc-options: -main-is Streamly.Test.Prelude.WAsync.main
341test-suite Prelude.WSerial
342 import: test-options
343 type: exitcode-stdio-1.0
344 main-is: Streamly/Test/Prelude/WSerial.hs
345 ghc-options: -main-is Streamly.Test.Prelude.WSerial.main
347test-suite Prelude.ZipAsync
348 import: test-options
349 type: exitcode-stdio-1.0
350 main-is: Streamly/Test/Prelude/ZipAsync.hs
351 ghc-options: -main-is Streamly.Test.Prelude.ZipAsync.main
353test-suite Prelude.ZipSerial
354 import: test-options
355 type: exitcode-stdio-1.0
356 main-is: Streamly/Test/Prelude/ZipSerial.hs
357 ghc-options: -main-is Streamly.Test.Prelude.ZipSerial.main
359test-suite Unicode.Stream
360 import: test-options
361 type: exitcode-stdio-1.0
362 main-is: Streamly/Test/Unicode/Stream.hs
363 ghc-options: -main-is Streamly.Test.Unicode.Stream.main
365test-suite version-bounds
366 import: test-options
367 type: exitcode-stdio-1.0
368 main-is: version-bounds.hs