From 535ce96533fb693a8a4441b0ac17cdb78bddfeec Mon Sep 17 00:00:00 2001 From: Sebastian Graf Date: Wed, 24 Jan 2024 21:22:14 +0100 Subject: [PATCH] Compile testsuite with -threaded (#264) Fixes #264. --- happy.cabal | 1 + test.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/happy.cabal b/happy.cabal index 1293dc24..a2904506 100644 --- a/happy.cabal +++ b/happy.cabal @@ -161,6 +161,7 @@ test-suite tests main-is: test.hs -- This line is important as it ensures that the local `exe:happy` component declared above is built before the test-suite component is invoked, as well as making sure that `happy` is made available on $PATH and `$happy_datadir` is set accordingly before invoking `test.hs` build-tools: happy + ghc-options: -threaded build-depends: base, process default-language: Haskell98 diff --git a/test.hs b/test.hs index 816640d3..8e9679b6 100644 --- a/test.hs +++ b/test.hs @@ -4,6 +4,6 @@ import System.Process (system) import System.Exit (exitWith) main = do - let jFlag = "-j" ++ show numCapabilities + let jFlag = "-j" ++ show numCapabilities -- to run tests in parallel, run `cabal test --test-options="+RTS -N"` let cmd = ["make", jFlag, "-k", "-C", "tests", "clean", "all"] system (intercalate " " cmd) >>= exitWith