Hello community, here is the log from the commit of package ghc-tasty-dejafu for openSUSE:Factory checked in at 2017-04-18 13:50:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-tasty-dejafu (Old) and /work/SRC/openSUSE:Factory/.ghc-tasty-dejafu.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-tasty-dejafu" Tue Apr 18 13:50:59 2017 rev:2 rq:489019 version:0.3.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-tasty-dejafu/ghc-tasty-dejafu.changes 2017-04-11 09:30:41.615719075 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-tasty-dejafu.new/ghc-tasty-dejafu.changes 2017-04-18 13:51:00.393305099 +0200 @@ -1,0 +2,5 @@ +Thu Sep 15 06:51:38 UTC 2016 - psim...@suse.com + +- Update to version 0.3.0.2 revision 0 with cabal2obs. + +------------------------------------------------------------------- Old: ---- tasty-dejafu-0.3.0.1.tar.gz New: ---- tasty-dejafu-0.3.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-tasty-dejafu.spec ++++++ --- /var/tmp/diff_new_pack.RagXhn/_old 2017-04-18 13:51:03.348886781 +0200 +++ /var/tmp/diff_new_pack.RagXhn/_new 2017-04-18 13:51:03.356885649 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-tasty-dejafu # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,21 +18,19 @@ %global pkg_name tasty-dejafu Name: ghc-%{pkg_name} -Version: 0.3.0.1 +Version: 0.3.0.2 Release: 0 Summary: Deja Fu support for the Tasty test framework License: MIT -Group: System/Libraries +Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel -# Begin cabal-rpm deps: BuildRequires: ghc-dejafu-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-tagged-devel BuildRequires: ghc-tasty-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build -# End cabal-rpm deps %description Integration between the <https://hackage.haskell.org/package/dejafu dejafu> @@ -56,15 +54,12 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install - %post devel %ghc_pkg_recache ++++++ tasty-dejafu-0.3.0.1.tar.gz -> tasty-dejafu-0.3.0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasty-dejafu-0.3.0.1/Test/Tasty/DejaFu.hs new/tasty-dejafu-0.3.0.2/Test/Tasty/DejaFu.hs --- old/tasty-dejafu-0.3.0.1/Test/Tasty/DejaFu.hs 2016-05-26 14:46:37.000000000 +0200 +++ new/tasty-dejafu-0.3.0.2/Test/Tasty/DejaFu.hs 2016-08-28 15:57:25.000000000 +0200 @@ -10,8 +10,16 @@ {-# LANGUAGE ImpredicativeTypes #-} #endif --- | This module allows using Deja Fu predicates with Tasty to test --- the behaviour of concurrent systems. +-- | +-- Module : Test.Tasty.DejaFu +-- Copyright : (c) 2016 Michael Walker +-- License : MIT +-- Maintainer : Michael Walker <m...@barrucadu.co.uk> +-- Stability : stable +-- Portability : CPP, FlexibleInstances, GADTs, ImpredicativeTypes, RankNTypes, TypeSynonymInstances +-- +-- This module allows using Deja Fu predicates with Tasty to test the +-- behaviour of concurrent systems. module Test.Tasty.DejaFu ( -- * Unit testing @@ -47,49 +55,66 @@ , MemType(..) ) where +import Control.Monad.ST (runST) import Data.Char (toUpper) import Data.List (intercalate, intersperse) import Data.Proxy (Proxy(..)) import Data.Tagged (Tagged(..)) import Data.Typeable (Typeable) import Test.DejaFu -import Test.DejaFu.Deterministic (ConcST, ConcIO, Trace, ThreadId, ThreadAction, Lookahead, showFail, showTrace) -import Test.DejaFu.SCT (sctBound, sctBoundIO) +import qualified Test.DejaFu.SCT as SCT import Test.Tasty (TestName, TestTree, testGroup) import Test.Tasty.Options (OptionDescription(..), IsOption(..), lookupOption) import Test.Tasty.Providers (IsTest(..), singleTest, testPassed, testFailed) +#if MIN_VERSION_dejafu(0,4,0) +import qualified Test.DejaFu.Conc as Conc +#else +import qualified Test.DejaFu.Deterministic as Conc +#endif + -- Can't put the necessary forall in the @IsTest ConcST t@ -- instance :( import Unsafe.Coerce (unsafeCoerce) #if MIN_VERSION_dejafu(0,3,0) -type Trc = Trace ThreadId ThreadAction Lookahead +type Trc = Conc.Trace Conc.ThreadId Conc.ThreadAction Conc.Lookahead +#else +type Trc = Conc.Trace +#endif + +sctBoundST :: MemType -> Bounds -> (forall t. Conc.ConcST t a) -> [(Either Failure a, Trc)] +sctBoundIO :: MemType -> Bounds -> Conc.ConcIO a -> IO [(Either Failure a, Trc)] + +#if MIN_VERSION_dejafu(0,4,0) +sctBoundST memtype cb conc = runST (SCT.sctBound memtype cb conc) +sctBoundIO = SCT.sctBound #else -type Trc = Trace +sctBoundST = SCT.sctBound +sctBoundIO = SCT.sctBoundIO #endif -------------------------------------------------------------------------------- -- Unit testing -instance Typeable t => IsTest (ConcST t (Maybe String)) where +instance Typeable t => IsTest (Conc.ConcST t (Maybe String)) where testOptions = Tagged concOptions run options conc callback = do let memtype = lookupOption options :: MemType let bounds = lookupOption options :: Bounds - let sctBound' :: ConcST t (Maybe String) -> [(Either Failure (Maybe String), Trc)] - sctBound' = unsafeCoerce $ sctBound memtype bounds + let sctBound' :: Conc.ConcST t (Maybe String) -> [(Either Failure (Maybe String), Trc)] + sctBound' = unsafeCoerce $ sctBoundST memtype bounds let traces = sctBound' conc run options (ConcTest traces assertableP) callback -instance IsTest (ConcIO (Maybe String)) where +instance IsTest (Conc.ConcIO (Maybe String)) where testOptions = Tagged concOptions run options conc callback = do let memtype = lookupOption options let bounds = lookupOption options - let traces = sctBoundIO memtype bounds conc + let traces = sctBoundIO memtype bounds conc run options (ConcIOTest traces assertableP) callback concOptions :: [OptionDescription] @@ -129,7 +154,7 @@ -- 'MonadConc'. If you need to test something which also uses -- 'MonadIO', use 'testAutoIO'. testAuto :: (Eq a, Show a) - => (forall t. ConcST t a) + => (forall t. Conc.ConcST t a) -- ^ The computation to test -> TestTree testAuto = testAuto' defaultMemType @@ -139,17 +164,17 @@ testAuto' :: (Eq a, Show a) => MemType -- ^ The memory model to use for non-synchronised @CRef@ operations. - -> (forall t. ConcST t a) + -> (forall t. Conc.ConcST t a) -- ^ The computation to test -> TestTree testAuto' memtype conc = testDejafus' memtype defaultBounds conc autocheckCases -- | Variant of 'testAuto' for computations which do 'IO'. -testAutoIO :: (Eq a, Show a) => ConcIO a -> TestTree +testAutoIO :: (Eq a, Show a) => Conc.ConcIO a -> TestTree testAutoIO = testAutoIO' defaultMemType -- | Variant of 'testAuto'' for computations which do 'IO'. -testAutoIO' :: (Eq a, Show a) => MemType -> ConcIO a -> TestTree +testAutoIO' :: (Eq a, Show a) => MemType -> Conc.ConcIO a -> TestTree testAutoIO' memtype concio = testDejafusIO' memtype defaultBounds concio autocheckCases -- | Predicates for the various autocheck functions. @@ -162,7 +187,7 @@ -- | Check that a predicate holds. testDejafu :: Show a - => (forall t. ConcST t a) + => (forall t. Conc.ConcST t a) -- ^ The computation to test -> TestName -- ^ The name of the test. @@ -178,7 +203,7 @@ -- ^ The memory model to use for non-synchronised @CRef@ operations. -> Bounds -- ^ The schedule bounds. - -> (forall t. ConcST t a) + -> (forall t. Conc.ConcST t a) -- ^ The computation to test -> TestName -- ^ The name of the test. @@ -191,7 +216,7 @@ -- test. This will share work between the predicates, rather than -- running the concurrent computation many times for each predicate. testDejafus :: Show a - => (forall t. ConcST t a) + => (forall t. Conc.ConcST t a) -- ^ The computation to test -> [(TestName, Predicate a)] -- ^ The list of predicates (with names) to check @@ -205,7 +230,7 @@ -- ^ The memory model to use for non-synchronised @CRef@ operations. -> Bounds -- ^ The schedule bounds. - -> (forall t. ConcST t a) + -> (forall t. Conc.ConcST t a) -- ^ The computation to test -> [(TestName, Predicate a)] -- ^ The list of predicates (with names) to check @@ -213,19 +238,19 @@ testDejafus' = testst -- | Variant of 'testDejafu' for computations which do 'IO'. -testDejafuIO :: Show a => ConcIO a -> TestName -> Predicate a -> TestTree +testDejafuIO :: Show a => Conc.ConcIO a -> TestName -> Predicate a -> TestTree testDejafuIO = testDejafuIO' defaultMemType defaultBounds -- | Variant of 'testDejafu'' for computations which do 'IO'. -testDejafuIO' :: Show a => MemType -> Bounds -> ConcIO a -> TestName -> Predicate a -> TestTree +testDejafuIO' :: Show a => MemType -> Bounds -> Conc.ConcIO a -> TestName -> Predicate a -> TestTree testDejafuIO' memtype cb concio name p = testDejafusIO' memtype cb concio [(name, p)] -- | Variant of 'testDejafus' for computations which do 'IO'. -testDejafusIO :: Show a => ConcIO a -> [(TestName, Predicate a)] -> TestTree +testDejafusIO :: Show a => Conc.ConcIO a -> [(TestName, Predicate a)] -> TestTree testDejafusIO = testDejafusIO' defaultMemType defaultBounds -- | Variant of 'dejafus'' for computations which do 'IO'. -testDejafusIO' :: Show a => MemType -> Bounds -> ConcIO a -> [(TestName, Predicate a)] -> TestTree +testDejafusIO' :: Show a => MemType -> Bounds -> Conc.ConcIO a -> [(TestName, Predicate a)] -> TestTree testDejafusIO' = testio -------------------------------------------------------------------------------- @@ -255,7 +280,7 @@ return $ if null err then testPassed "" else testFailed err -- | Produce a Tasty 'TestTree' from a Deja Fu test. -testst :: Show a => MemType -> Bounds -> (forall t. ConcST t a) -> [(TestName, Predicate a)] -> TestTree +testst :: Show a => MemType -> Bounds -> (forall t. Conc.ConcST t a) -> [(TestName, Predicate a)] -> TestTree testst memtype cb conc tests = case map toTest tests of [t] -> t ts -> testGroup "Deja Fu Tests" ts @@ -263,10 +288,10 @@ where toTest (name, p) = singleTest name $ ConcTest traces p - traces = sctBound memtype cb conc + traces = sctBoundST memtype cb conc -- | Produce a Tasty 'Test' from an IO-using Deja Fu test. -testio :: Show a => MemType -> Bounds -> ConcIO a -> [(TestName, Predicate a)] -> TestTree +testio :: Show a => MemType -> Bounds -> Conc.ConcIO a -> [(TestName, Predicate a)] -> TestTree testio memtype cb concio tests = case map toTest tests of [t] -> t ts -> testGroup "Deja Fu Tests" ts @@ -287,7 +312,7 @@ msg = if null (_failureMsg res) then "" else _failureMsg res ++ "\n" - failures = intersperse "" . map (\(r, t) -> indent $ either showFail show r ++ " " ++ showTrace t) . take 5 $ _failures res + failures = intersperse "" . map (\(r, t) -> indent $ either Conc.showFail show r ++ " " ++ Conc.showTrace t) . take 5 $ _failures res rest = if moreThan (_failures res) 5 then "\n\t..." else "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasty-dejafu-0.3.0.1/tasty-dejafu.cabal new/tasty-dejafu-0.3.0.2/tasty-dejafu.cabal --- old/tasty-dejafu-0.3.0.1/tasty-dejafu.cabal 2016-05-26 13:36:38.000000000 +0200 +++ new/tasty-dejafu-0.3.0.2/tasty-dejafu.cabal 2016-08-28 15:57:25.000000000 +0200 @@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: tasty-dejafu -version: 0.3.0.1 +version: 0.3.0.2 synopsis: Deja Fu support for the Tasty test framework. description: @@ -40,8 +40,8 @@ -- other-modules: -- other-extensions: build-depends: base >=4.8 && <5 - , dejafu >=0.2 && <0.4 + , dejafu >=0.2 && <0.5 , tagged >=0.8 && <0.9 , tasty >=0.10 && <0.12 -- hs-source-dirs: - default-language: Haskell2010 \ No newline at end of file + default-language: Haskell2010