Skip to content

Commit

Permalink
Compile testsuite with -threaded (haskell#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgraf812 committed Jan 25, 2024
1 parent abcd8c0 commit a214c02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions happy.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a214c02

Please sign in to comment.