Skip to content

Commit

Permalink
Add smp flag
Browse files Browse the repository at this point in the history
This flag will toggle the use of some `ghc-options` in the
`typed-process-test` test suite. It is set to `default: True`.

This is needed for tests to run on some GHC builds which do not support
a threaded runtime.

Signed-off-by: hololeap <[email protected]>
  • Loading branch information
hololeap committed Oct 28, 2022
1 parent 52bda62 commit 683e0c9
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ dependencies:
- transformers
- unliftio-core

flags:
smp:
description: Use flags that depend on GHC supporting a multicore runtime (tests only)
default: True
manual: True

library:
source-dirs: src
when:
Expand All @@ -32,10 +38,16 @@ tests:
typed-process-test:
main: Spec.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
when:
- condition: flag(smp)
then:
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
else:
ghc-options:
- -threaded
dependencies:
- base64-bytestring
- hspec
Expand Down

0 comments on commit 683e0c9

Please sign in to comment.