diff --git a/.travis.yml b/.travis.yml index a67ec03..d148072 100644 --- a/.travis.yml +++ b/.travis.yml @@ -277,7 +277,7 @@ script: if [ -f configure.ac ]; then autoreconf -i; fi cabal configure --enable-tests --enable-benchmarks -v # -v2 provides useful information for debugging better_wait cabal build -j$JOBS --ghc-options="-j1 +RTS -M500M -RTS -Werror" # this builds all libraries and executables (including tests/benchmarks) - cabal test + time cabal test --ghc-options="-with-rtsopts -N1" ;; cabaldist) # cabal check @@ -292,7 +292,7 @@ script: canew) better_wait cabal new-build -j$JOBS --ghc-options="-j1 +RTS -M500M -RTS" --disable-tests --disable-benchmarks better_wait cabal new-build -j$JOBS --ghc-options="-j1 +RTS -M500M -RTS" --enable-tests --enable-benchmarks - cabal new-test -j1 --ghc-options="-j1 +RTS -M500M -RTS" + time cabal new-test -j1 --ghc-options="-j1 +RTS -M500M -RTS" ;; esac set +ex diff --git a/brittany.cabal b/brittany.cabal index 4d43fcc..da69f91 100644 --- a/brittany.cabal +++ b/brittany.cabal @@ -269,6 +269,10 @@ test-suite unittests -fno-warn-unused-imports -rtsopts -with-rtsopts "-M2G" + -threaded + -- ^ threaded is not necessary at all, but our CI trusts on being able + -- to pass -N1, which is not possible without threaded :-/ + -- (plus -no-threaded is not a thing, afaict) } test-suite littests @@ -372,4 +376,8 @@ test-suite libinterfacetests -fno-warn-unused-imports -rtsopts -with-rtsopts "-M2G" + -threaded + -- ^ threaded is not necessary at all, but our CI trusts on being able + -- to pass -N1, which is not possible without threaded :-/ + -- (plus -no-threaded is not a thing, afaict) } diff --git a/src-literatetests/Main.hs b/src-literatetests/Main.hs index 1196a56..284c696 100644 --- a/src-literatetests/Main.hs +++ b/src-literatetests/Main.hs @@ -23,7 +23,6 @@ import Language.Haskell.Brittany.Internal.Config.Types import Language.Haskell.Brittany.Internal.Config import Data.Coerce ( coerce ) -import GHC.Conc ( getNumCapabilities ) import qualified Data.Text.IO as Text.IO import System.FilePath ( () ) @@ -50,8 +49,7 @@ main = do let groups = createChunks =<< inputs inputCtxFree <- Text.IO.readFile "src-literatetests/30-tests-context-free.blt" let groupsCtxFree = createChunks inputCtxFree - jobs <- getNumCapabilities - hspecWith (defaultConfig { configConcurrentJobs = Just jobs }) $ do + hspec $ do groups `forM_` \(groupname, tests) -> do describe (Text.unpack groupname) $ tests `forM_` \(name, pend, inp) -> do (if pend then before_ pending else id)