on 796bb22 help sign in
streamly/test/streamly-tests.cabal
367 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 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
183 ghc-options: -fplugin Fusion.Plugin
185-------------------------------------------------------------------------------
186-- Test suites in sorted order
187-------------------------------------------------------------------------------
189test-suite Data.List
190 import: test-options
191 type: exitcode-stdio-1.0
192 main-is: Streamly/Test/Data/List.hs
193 cpp-options: -DUSE_STREAMLY_LIST
195test-suite Data.List.Base
196 import: test-options
197 type: exitcode-stdio-1.0
198 main-is: Streamly/Test/Data/List.hs
200test-suite Data.Array
201 import: test-options
202 type: exitcode-stdio-1.0
203 main-is: Streamly/Test/Data/Array.hs
204 ghc-options: -main-is Streamly.Test.Data.Array.main
206test-suite Data.Array.Prim
207 import: test-options
208 type: exitcode-stdio-1.0
209 main-is: Streamly/Test/Data/Array/Prim.hs
210 ghc-options: -main-is Streamly.Test.Data.Array.Prim.main
212test-suite Data.Array.Prim.Pinned
213 import: test-options
214 type: exitcode-stdio-1.0
215 main-is: Streamly/Test/Data/Array/Prim/Pinned.hs
216 ghc-options: -main-is Streamly.Test.Data.Array.Prim.Pinned.main
218test-suite Data.Array.Foreign
219 import: test-options
220 type: exitcode-stdio-1.0
221 main-is: Streamly/Test/Data/Array/Foreign.hs
222 ghc-options: -main-is Streamly.Test.Data.Array.Foreign.main
224test-suite Data.Fold
225 import: test-options
226 type: exitcode-stdio-1.0
227 main-is: Streamly/Test/Data/Fold.hs
229test-suite Data.Parser
230 import: test-options
231 type: exitcode-stdio-1.0
232 main-is: Streamly/Test/Data/Parser.hs
233 if flag(limit-build-mem)
234 ghc-options: +RTS -M1000M -RTS
236test-suite Data.Parser.ParserD
237 import: test-options
238 type: exitcode-stdio-1.0
239 main-is: Streamly/Test/Data/Parser/ParserD.hs
240 if flag(limit-build-mem)
241 ghc-options: +RTS -M1000M -RTS
243test-suite Data.SmallArray
244 import: test-options
245 type: exitcode-stdio-1.0
246 main-is: Streamly/Test/Data/SmallArray.hs
247 ghc-options: -main-is Streamly.Test.Data.SmallArray.main
249test-suite Data.Unfold
250 import: test-options
251 type: exitcode-stdio-1.0
252 main-is: Streamly/Test/Data/Unfold.hs
254test-suite FileSystem.Event
255 import: test-options
256 type: exitcode-stdio-1.0
257 main-is: Streamly/Test/FileSystem/Event.hs
258 if os(darwin)
259 buildable: False
261test-suite FileSystem.Handle
262 import: test-options
263 type: exitcode-stdio-1.0
264 main-is: Streamly/Test/FileSystem/Handle.hs
265 ghc-options: -main-is Streamly.Test.FileSystem.Handle.main
267test-suite Network.Inet.TCP
268 import: test-options
269 type: exitcode-stdio-1.0
270 main-is: Streamly/Test/Network/Inet/TCP.hs
272test-suite Network.Socket
273 import: test-options
274 type: exitcode-stdio-1.0
275 main-is: Streamly/Test/Network/Socket.hs
277test-suite Prelude
278 import: test-options
279 type: exitcode-stdio-1.0
280 main-is: Streamly/Test/Prelude.hs
281 ghc-options: -main-is Streamly.Test.Prelude.main
283test-suite Prelude.Ahead
284 import: test-options
285 type: exitcode-stdio-1.0
286 main-is: Streamly/Test/Prelude/Ahead.hs
287 ghc-options: -main-is Streamly.Test.Prelude.Ahead.main
289test-suite Prelude.Async
290 import: test-options
291 type: exitcode-stdio-1.0
292 main-is: Streamly/Test/Prelude/Async.hs
293 ghc-options: -main-is Streamly.Test.Prelude.Async.main
295test-suite Prelude.Concurrent
296 import: test-options
297 type: exitcode-stdio-1.0
298 main-is: Streamly/Test/Prelude/Concurrent.hs
299 ghc-options: -main-is Streamly.Test.Prelude.Concurrent.main
300 if flag(limit-build-mem)
301 ghc-options: +RTS -M2000M -RTS
303test-suite Prelude.Fold
304 import: test-options
305 type: exitcode-stdio-1.0
306 main-is: Streamly/Test/Prelude/Fold.hs
307 ghc-options: -main-is Streamly.Test.Prelude.Fold.main
309test-suite Prelude.Parallel
310 import: test-options
311 type: exitcode-stdio-1.0
312 main-is: Streamly/Test/Prelude/Parallel.hs
313 ghc-options: -main-is Streamly.Test.Prelude.Parallel.main
315test-suite Prelude.Rate
316 import:always-optimized
317 type: exitcode-stdio-1.0
318 main-is: Streamly/Test/Prelude/Rate.hs
319 ghc-options: -main-is Streamly.Test.Prelude.Rate.main
320 if flag(dev)
321 buildable: True
322 else
323 buildable: False
325test-suite Prelude.Serial
326 import: test-options
327 type: exitcode-stdio-1.0
328 main-is: Streamly/Test/Prelude/Serial.hs
329 ghc-options: -main-is Streamly.Test.Prelude.Serial.main
330 if flag(limit-build-mem)
331 ghc-options: +RTS -M1500M -RTS
334test-suite Prelude.WAsync
335 import: test-options
336 type: exitcode-stdio-1.0
337 main-is: Streamly/Test/Prelude/WAsync.hs
338 ghc-options: -main-is Streamly.Test.Prelude.WAsync.main
340test-suite Prelude.WSerial
341 import: test-options
342 type: exitcode-stdio-1.0
343 main-is: Streamly/Test/Prelude/WSerial.hs
344 ghc-options: -main-is Streamly.Test.Prelude.WSerial.main
346test-suite Prelude.ZipAsync
347 import: test-options
348 type: exitcode-stdio-1.0
349 main-is: Streamly/Test/Prelude/ZipAsync.hs
350 ghc-options: -main-is Streamly.Test.Prelude.ZipAsync.main
352test-suite Prelude.ZipSerial
353 import: test-options
354 type: exitcode-stdio-1.0
355 main-is: Streamly/Test/Prelude/ZipSerial.hs
356 ghc-options: -main-is Streamly.Test.Prelude.ZipSerial.main
358test-suite Unicode.Stream
359 import: test-options
360 type: exitcode-stdio-1.0
361 main-is: Streamly/Test/Unicode/Stream.hs
362 ghc-options: -main-is Streamly.Test.Unicode.Stream.main
364test-suite version-bounds
365 import: test-options
366 type: exitcode-stdio-1.0
367 main-is: version-bounds.hs