packages feed

distributed-process-systest 0.1.1 → 0.4.2

raw patch · 4 files changed

Files

+ ChangeLog view
@@ -0,0 +1,37 @@+2025-02-04 Laurent P. René de Cotret <laurent.decotret@outlook.com> 0.4.2++* Ported test suite to use `tasty` rather than `test-framework`.++2024-10-30 David Simmons-Duffin <dsd@caltech.edu> 0.4.1++* Bumped dependency bound for ansi-terminal++2024-10-30 Laurent P. René de Cotret <laurent.decotret@outlook.com> 0.4.0++* Removed dependency on `rematch` (#459). This means that certain functions +  are no longer exported: `shouldBe`, `shouldMatch`, `shouldContain`, +  `shouldNotContain`, and `expectThat`.++2024-09-03 Laurent P. René de Cotret <laurent.decotret@outlook.com> 0.3.2++* Bumped dependency bounds to support GHC 8.10.7 - GHC 9.10.1+* Updated links to point to Distributed Haskell monorepo++2024-03-26 David Simmons-Duffin <dsd@caltech.edu> 0.3.1++* Relaxed upper bounds to build with ghc-9.8+* Fixed syntax errors with Haskell2010++2018-11-10 Tim Watson <watson.timothy@gmail.com> 0.3.0++* Relaxed upper bounds to allow for newer versions of exceptions+* Support for GHC 8.2 (thanks agentm)+* further relax upper bounds for HUnit (thanks Alexander Vershilov)++2017-02-05 Tim Watson <watson.timothy@gmail.com> 0.1.1++* Bugfix: relax upper bounds for HUnit++2017-02-04 Tim Watson <watson.timothy@gmail.com> 0.1.0++* Initial Release
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
distributed-process-systest.cabal view
@@ -1,46 +1,52 @@+cabal-version: 3.0 name:          distributed-process-systest-version:       0.1.1+version:       0.4.2 synopsis:      Cloud Haskell Test Support description:   Testing Frameworks and Capabilities for programs built on Cloud Haskell homepage:      http://github.com/haskell-distributed/distributed-process-systest-license:       BSD3+license:       BSD-3-Clause license-file:  LICENSE Author:        Tim Watson-Maintainer:    watson.timothy@gmail.com+maintainer:    The Distributed Haskell team copyright:     Tim Watson category:      Control, Cloud Haskell build-type:    Simple-cabal-version: >=1.8+extra-doc-files: ChangeLog  source-repository head-  type:      git-  location:  https://github.com/haskell-distributed/distributed-process-systest+  Type:     git+  Location: https://github.com/haskell-distributed/distributed-process+  SubDir:   packages/distributed-process-systest +common warnings+    ghc-options: -Wall+                 -Wcompat+                 -Widentities+                 -Wincomplete-uni-patterns+                 -Wincomplete-record-updates+                 -Wredundant-constraints+                 -fhide-source-paths+                 -Wpartial-fields+                 -Wunused-packages+ library+  import:            warnings   exposed-modules:   Control.Distributed.Process.SysTest.Utils-  Build-Depends:     base >= 4.4 && < 5,-                     ansi-terminal >= 0.5 && < 0.7,-                     binary >= 0.5 && < 0.9,-                     bytestring >= 0.9 && < 0.11,-                     distributed-process >= 0.6.1 && < 0.7,-                     distributed-static,-                     HUnit >= 1.2 && < 1.6,-                     network-transport >= 0.4.1.0 && < 0.5,-                     network >= 2.5 && < 2.7,-                     random >= 1.0 && < 1.2,-                     rematch >= 0.1.2.1,-                     test-framework >= 0.6 && < 0.9,-                     test-framework-hunit >= 0.2.0 && < 0.4,-                     stm+  Build-Depends:     base >= 4.14 && < 5,+                     binary >= 0.8 && < 1.0,+                     distributed-process >= 0.6.1 && < 0.8,+                     HUnit >= 1.2 && < 2,+                     exceptions < 0.11,+                     stm < 2.6   hs-source-dirs:    src+  default-language:  Haskell2010   ghc-options:       -Wall -fno-warn-unused-do-bind-  extensions:        CPP,-                     ExistentialQuantification,-                     FlexibleInstances,-                     DeriveDataTypeable,-                     DeriveGeneric,-                     GeneralizedNewtypeDeriving,-                     OverlappingInstances,-                     RankNTypes,-                     RecordWildCards,-                     ScopedTypeVariables+  default-extensions: CPP,+                      ExistentialQuantification,+                      FlexibleInstances,+                      DeriveDataTypeable,+                      DeriveGeneric,+                      GeneralizedNewtypeDeriving,+                      RankNTypes,+                      RecordWildCards,+                      ScopedTypeVariables
src/Control/Distributed/Process/SysTest/Utils.hs view
@@ -1,7 +1,6 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric      #-} {-# LANGUAGE TemplateHaskell    #-}-{-# LANGUAGE CPP                #-}  ----------------------------------------------------------------------------- -- |@@ -20,11 +19,6 @@   -- ping !   , Ping(Ping)   , ping-  , shouldBe-  , shouldMatch-  , shouldContain-  , shouldNotContain-  , expectThat   , synchronisedAssertion   -- test process utilities   , TestProcessControl@@ -47,9 +41,6 @@   , stash   ) where -#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch)-#endif import Control.Concurrent   ( ThreadId   , myThreadId@@ -73,19 +64,18 @@ import Control.Concurrent.MVar   ( putMVar   )-import Control.Distributed.Process+import Control.Distributed.Process hiding (catch, finally) import Control.Distributed.Process.Node import Control.Distributed.Process.Serializable()+import Control.Monad.Catch -import Control.Exception (AsyncException(ThreadKilled), SomeException)+import Control.Exception (AsyncException(ThreadKilled)) import Control.Monad (forever) import Control.Monad.STM (atomically)-import Control.Rematch hiding (match)-import Control.Rematch.Run  import Data.Binary import Data.Typeable (Typeable) -import Test.HUnit (Assertion, assertFailure)+import Test.HUnit (Assertion) import Test.HUnit.Base (assertBool)  import GHC.Generics@@ -131,24 +121,6 @@ stash :: TestResult a -> a -> Process () stash mvar x = liftIO $ putMVar mvar x -expectThat :: a -> Matcher a -> Process ()-expectThat a matcher = case res of-  MatchSuccess -> return ()-  (MatchFailure msg) -> liftIO $ assertFailure msg-  where res = runMatch matcher a--shouldBe :: a -> Matcher a -> Process ()-shouldBe = expectThat--shouldContain :: (Show a, Eq a) => [a] -> a -> Process ()-shouldContain xs x = expectThat xs $ hasItem (equalTo x)--shouldNotContain :: (Show a, Eq a) => [a] -> a -> Process ()-shouldNotContain xs x = expectThat xs $ isNot (hasItem (equalTo x))--shouldMatch :: a -> Matcher a -> Process ()-shouldMatch = expectThat- -- | Run the supplied @testProc@ using an @MVar@ to collect and assert -- against its result. Uses the supplied @note@ if the assertion fails. delayedAssertion :: (Eq a) => String -> LocalNode -> a ->@@ -177,8 +149,8 @@   _ <- forkIO $ logger q   return $ Logger tid q   where logger q' = forever $ do-        msg <- atomically $ readTQueue q'-        putStrLn msg+          msg <- atomically $ readTQueue q'+          putStrLn msg  -- | Send a message to the Logger putLogMsg :: Logger -> String -> Process ()