From c0f28f440ea361594fcfde8541ad117e54a4c161 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Tue, 23 May 2023 18:14:12 +0700 Subject: [PATCH] Run tests in parallel + get rid of `-with-rtsopts=-N` (fixes #59) --- package.yaml | 4 +--- test/SpecHook.hs | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 test/SpecHook.hs diff --git a/package.yaml b/package.yaml index 5b6a7e5..af0e545 100644 --- a/package.yaml +++ b/package.yaml @@ -35,11 +35,9 @@ tests: source-dirs: test ghc-options: - -threaded - - -rtsopts - - -with-rtsopts=-N dependencies: - base64-bytestring - - hspec == 2.* + - hspec >= 2.8.3 && < 3 - temporary - typed-process typed-process-test-single-threaded: diff --git a/test/SpecHook.hs b/test/SpecHook.hs new file mode 100644 index 0000000..cfb1f0d --- /dev/null +++ b/test/SpecHook.hs @@ -0,0 +1,7 @@ +module SpecHook where + +import Test.Hspec +import GHC.Conc + +hook :: Spec -> Spec +hook spec = runIO (getNumProcessors >>= setNumCapabilities) >> parallel spec