Hello community,

here is the log from the commit of package ghc-tasty-ant-xml for 
openSUSE:Factory checked in at 2017-01-27 11:13:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-tasty-ant-xml (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-tasty-ant-xml.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-tasty-ant-xml"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-tasty-ant-xml/ghc-tasty-ant-xml.changes      
2017-01-12 15:53:57.783371364 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-tasty-ant-xml.new/ghc-tasty-ant-xml.changes 
2017-02-03 17:40:08.787934311 +0100
@@ -1,0 +2,5 @@
+Sun Jan  8 21:13:11 UTC 2017 - [email protected]
+
+- Update to version 1.0.4 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  tasty-ant-xml-1.0.3.tar.gz

New:
----
  tasty-ant-xml-1.0.4.tar.gz

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

Other differences:
------------------
++++++ ghc-tasty-ant-xml.spec ++++++
--- /var/tmp/diff_new_pack.7RWGNS/_old  2017-02-03 17:40:09.919774110 +0100
+++ /var/tmp/diff_new_pack.7RWGNS/_new  2017-02-03 17:40:09.919774110 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-tasty-ant-xml
 #
-# 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,7 +18,7 @@
 
 %global pkg_name tasty-ant-xml
 Name:           ghc-%{pkg_name}
-Version:        1.0.3
+Version:        1.0.4
 Release:        0
 Summary:        Render tasty output to XML for Jenkins
 License:        BSD-3-Clause

++++++ tasty-ant-xml-1.0.3.tar.gz -> tasty-ant-xml-1.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-ant-xml-1.0.3/Changelog.md 
new/tasty-ant-xml-1.0.4/Changelog.md
--- old/tasty-ant-xml-1.0.3/Changelog.md        2016-12-18 10:51:24.000000000 
+0100
+++ new/tasty-ant-xml-1.0.4/Changelog.md        2016-12-22 18:18:26.000000000 
+0100
@@ -1,3 +1,7 @@
+# 1.0.4
+
+* We now use the `classname` attribute to indicate the test group a test came 
from. Thanks to @haishengwu-okta for this feature.
+
 # 1.0.3
 
 * Now creates the directory containing the report XML file. Thanks to 
@haishengwu-okta for this feature.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-ant-xml-1.0.3/Test/Tasty/Runners/AntXML.hs 
new/tasty-ant-xml-1.0.4/Test/Tasty/Runners/AntXML.hs
--- old/tasty-ant-xml-1.0.3/Test/Tasty/Runners/AntXML.hs        2016-12-18 
10:51:24.000000000 +0100
+++ new/tasty-ant-xml-1.0.4/Test/Tasty/Runners/AntXML.hs        2016-12-22 
18:18:26.000000000 +0100
@@ -12,7 +12,7 @@
 import Numeric (showFFloat)
 import Control.Applicative
 import Control.Arrow (first)
-import Control.Monad.Trans.Class (lift)
+import Control.Monad.IO.Class (liftIO)
 import Data.Maybe (fromMaybe)
 import Data.Monoid (Monoid(..), Endo(..), Sum(..))
 import Data.Proxy (Proxy(..))
@@ -25,8 +25,11 @@
 
 import qualified Control.Concurrent.STM as STM
 import qualified Control.Monad.State as State
+import qualified Control.Monad.Reader as Reader
 import qualified Data.Functor.Compose as Functor
 import qualified Data.IntMap as IntMap
+import qualified Test.Tasty as Tasty
+import qualified Test.Tasty.Providers as Tasty
 import qualified Test.Tasty.Options as Tasty
 import qualified Test.Tasty.Runners as Tasty
 import qualified Text.XML.Light as XML
@@ -75,10 +78,16 @@
         timeDigits = 3
         showTime time = showFFloat (Just timeDigits) time ""
 
+        runTest :: (Tasty.IsTest t)
+                => Tasty.OptionSet
+                -> Tasty.TestName
+                -> t
+                -> Tasty.Traversal (Functor.Compose (Reader.ReaderT [String] 
(State.StateT IntMap.Key IO)) (Const Summary))
         runTest _ testName _ = Tasty.Traversal $ Functor.Compose $ do
           i <- State.get
+          groupNames <- Reader.ask
 
-          summary <- lift $ STM.atomically $ do
+          summary <- liftIO $ STM.atomically $ do
             status <- STM.readTVar $
               fromMaybe (error "Attempted to lookup test by index outside 
bounds") $
                 IntMap.lookup i statusMap
@@ -86,6 +95,7 @@
             let testCaseAttributes time = map (uncurry XML.Attr . first 
XML.unqual)
                   [ ("name", testName)
                   , ("time", showTime time)
+                  , ("classname", unwords groupNames)
                   ]
 
                 mkSummary contents =
@@ -120,7 +130,8 @@
           Const summary <$ State.modify (+ 1)
 
         runGroup groupName children = Tasty.Traversal $ Functor.Compose $ do
-          Const soFar <- Functor.getCompose $ Tasty.getTraversal children
+          Const soFar <- Reader.withReaderT (++ [groupName]) $ 
Functor.getCompose $ Tasty.getTraversal children
+
           let grouped = appEndo (xmlRenderer soFar) $
                 XML.node (XML.unqual "testsuite") $
                   XML.Attr (XML.unqual "name") groupName
@@ -131,7 +142,7 @@
 
       in do
         (Const summary, tests) <-
-          flip State.runStateT 0 $ Functor.getCompose $ Tasty.getTraversal $
+          flip State.runStateT 0 $ flip Reader.runReaderT [] $ 
Functor.getCompose $ Tasty.getTraversal $
            Tasty.foldTestTree
              Tasty.trivialFold { Tasty.foldSingle = runTest, Tasty.foldGroup = 
runGroup }
              options
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-ant-xml-1.0.3/tasty-ant-xml.cabal 
new/tasty-ant-xml-1.0.4/tasty-ant-xml.cabal
--- old/tasty-ant-xml-1.0.3/tasty-ant-xml.cabal 2016-12-18 10:51:24.000000000 
+0100
+++ new/tasty-ant-xml-1.0.4/tasty-ant-xml.cabal 2016-12-22 18:18:26.000000000 
+0100
@@ -1,5 +1,5 @@
 name: tasty-ant-xml
-version: 1.0.3
+version: 1.0.4
 synopsis: Render tasty output to XML for Jenkins
 description: A tasty ingredient to output test results in XML, using the Ant 
schema. This XML can be consumed by the Jenkins continuous integration 
framework.
 homepage: http://github.com/ocharles/tasty-ant-xml


Reply via email to