Hello community,

here is the log from the commit of package ghc-resourcet for openSUSE:Factory 
checked in at 2016-05-12 09:34:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-resourcet (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-resourcet.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-resourcet"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-resourcet/ghc-resourcet.changes      
2016-03-16 10:33:41.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-resourcet.new/ghc-resourcet.changes 
2016-05-12 09:34:09.000000000 +0200
@@ -1,0 +2,6 @@
+Sat May  7 06:27:14 UTC 2016 - mimi...@gmail.com
+
+- update to 1.1.7.4
+* Make test suite slightly more robust
+
+-------------------------------------------------------------------

Old:
----
  resourcet-1.1.7.3.tar.gz

New:
----
  resourcet-1.1.7.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-resourcet.spec ++++++
--- /var/tmp/diff_new_pack.FElJwN/_old  2016-05-12 09:34:10.000000000 +0200
+++ /var/tmp/diff_new_pack.FElJwN/_new  2016-05-12 09:34:10.000000000 +0200
@@ -19,7 +19,7 @@
 %global pkg_name resourcet
 
 Name:           ghc-resourcet
-Version:        1.1.7.3
+Version:        1.1.7.4
 Release:        0
 Summary:        Deterministic allocation and freeing of scarce resources
 License:        BSD-3-Clause

++++++ resourcet-1.1.7.3.tar.gz -> resourcet-1.1.7.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resourcet-1.1.7.3/ChangeLog.md 
new/resourcet-1.1.7.4/ChangeLog.md
--- old/resourcet-1.1.7.3/ChangeLog.md  2016-03-03 19:08:54.000000000 +0100
+++ new/resourcet-1.1.7.4/ChangeLog.md  2016-05-05 07:24:53.000000000 +0200
@@ -1,3 +1,7 @@
+## 1.1.7.4
+
+* Make test suite slightly more robust
+
 ## 1.1.7.3
 
 * Doc tweak
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resourcet-1.1.7.3/resourcet.cabal 
new/resourcet-1.1.7.4/resourcet.cabal
--- old/resourcet-1.1.7.3/resourcet.cabal       2016-03-03 19:08:54.000000000 
+0100
+++ new/resourcet-1.1.7.4/resourcet.cabal       2016-05-05 07:24:53.000000000 
+0200
@@ -1,5 +1,5 @@
 Name:                resourcet
-Version:             1.1.7.3
+Version:             1.1.7.4
 Synopsis:            Deterministic allocation and freeing of scarce resources.
 description:         Hackage documentation generation is not reliable. For up 
to date documentation, please see: <http://www.stackage.org/package/resourcet>.
 License:             BSD3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resourcet-1.1.7.3/test/main.hs 
new/resourcet-1.1.7.4/test/main.hs
--- old/resourcet-1.1.7.3/test/main.hs  2016-03-03 19:08:54.000000000 +0100
+++ new/resourcet-1.1.7.4/test/main.hs  2016-05-05 07:24:53.000000000 +0200
@@ -32,9 +32,34 @@
                 runResourceT $ release key
                 y <- liftIO $ readIORef x
                 liftIO $ y `shouldBe` 1
-    describe "forking" $ do
-        forkHelper "resourceForkIO" resourceForkIO
-        --forkHelper "lifted fork" fork
+    describe "resourceForkIO" $ do
+        it "waits for all threads" $ do
+            x <- newEmptyMVar
+            y <- newIORef 0
+            z <- newEmptyMVar
+            w <- newEmptyMVar
+
+            runResourceT $ do
+                _ <- register $ do
+                    writeIORef y 1
+                    putMVar w ()
+                resourceForkIO $ do
+                    () <- liftIO $ takeMVar x
+                    y' <- liftIO $ readIORef y
+                    _ <- register $ putMVar z y'
+                    return ()
+
+            y1 <- readIORef y
+            y1 `shouldBe` 0
+
+            putMVar x ()
+
+            z' <- takeMVar z
+            z' `shouldBe` 0
+
+            takeMVar w
+            y2 <- readIORef y
+            Just y2 `shouldBe` Just 1
     describe "unprotecting" $ do
         it "unprotect keeps resource from being cleared" $ do
             x <- newIORef 0
@@ -104,27 +129,3 @@
 data Dummy = Dummy
     deriving (Show, Typeable)
 instance Exception Dummy
-
-forkHelper s fork' = describe s $ do
-    it "waits for all threads" $ do
-        x <- newEmptyMVar
-        y <- newIORef 0
-        z <- newEmptyMVar
-        runResourceT $ do
-            _ <- register $ writeIORef y 1
-            fork' $ do
-                () <- liftIO $ takeMVar x
-                y' <- liftIO $ readIORef y
-                _ <- register $ putMVar z y'
-                return ()
-
-        y1 <- readIORef y
-        y1 `shouldBe` 0
-
-        putMVar x ()
-
-        z' <- takeMVar z
-        z' `shouldBe` 0
-
-        y2 <- readIORef y
-        Just y2 `shouldBe` Just 1


Reply via email to