Hello community, here is the log from the commit of package ghc-tasty for openSUSE:Factory checked in at 2017-08-31 21:00:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-tasty (Old) and /work/SRC/openSUSE:Factory/.ghc-tasty.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-tasty" Thu Aug 31 21:00:05 2017 rev:9 rq:513506 version:0.11.2.3 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-tasty/ghc-tasty.changes 2017-07-27 11:12:20.632626708 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-tasty.new/ghc-tasty.changes 2017-08-31 21:00:06.948626877 +0200 @@ -1,0 +2,5 @@ +Thu Jul 27 14:07:45 UTC 2017 - psim...@suse.com + +- Update to version 0.11.2.3. + +------------------------------------------------------------------- Old: ---- tasty-0.11.2.2.tar.gz New: ---- tasty-0.11.2.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-tasty.spec ++++++ --- /var/tmp/diff_new_pack.i8aBAQ/_old 2017-08-31 21:00:09.008337483 +0200 +++ /var/tmp/diff_new_pack.i8aBAQ/_new 2017-08-31 21:00:09.036333549 +0200 @@ -18,7 +18,7 @@ %global pkg_name tasty Name: ghc-%{pkg_name} -Version: 0.11.2.2 +Version: 0.11.2.3 Release: 0 Summary: Modern and extensible testing framework License: MIT ++++++ tasty-0.11.2.2.tar.gz -> tasty-0.11.2.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasty-0.11.2.2/CHANGELOG.md new/tasty-0.11.2.3/CHANGELOG.md --- old/tasty-0.11.2.2/CHANGELOG.md 2017-07-06 11:10:26.000000000 +0200 +++ new/tasty-0.11.2.3/CHANGELOG.md 2017-07-18 17:08:48.000000000 +0200 @@ -1,6 +1,11 @@ Changes ======= +Version 0.11.2.3 +---------------- + +Make filtering tests (`-p`) work faster + Version 0.11.2.2 ---------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasty-0.11.2.2/Test/Tasty/Patterns.hs new/tasty-0.11.2.3/Test/Tasty/Patterns.hs --- old/tasty-0.11.2.2/Test/Tasty/Patterns.hs 2017-07-06 11:05:04.000000000 +0200 +++ new/tasty-0.11.2.3/Test/Tasty/Patterns.hs 2017-07-18 08:32:55.000000000 +0200 @@ -115,20 +115,27 @@ -- | Test a path (which is the sequence of group titles, possibly followed -- by the test title) against a pattern testPatternMatches :: TestPattern -> [String] -> Bool -testPatternMatches NoPattern _ = True -testPatternMatches test_pattern path = not_maybe $ any (=~ tokens_regex) things_to_match +testPatternMatches test_pattern = + -- It is important that GHC assigns arity 1 to this function, + -- so that compilation of the regex is shared among the invocations. + -- See #175. + case test_pattern of + NoPattern -> const True + TestPattern {} -> \path -> + let + path_to_consider | tp_categories_only test_pattern = dropLast 1 path + | otherwise = path + things_to_match = case tp_match_mode test_pattern of + -- See if the tokens match any single path component + TestMatchMode -> path_to_consider + -- See if the tokens match any prefix of the path + PathMatchMode -> map pathToString $ inits path_to_consider + in not_maybe . any (match tokens_regex) $ things_to_match where not_maybe | tp_negated test_pattern = not | otherwise = id - path_to_consider | tp_categories_only test_pattern = dropLast 1 path - | otherwise = path - tokens_regex = buildTokenRegex (tp_tokens test_pattern) - - things_to_match = case tp_match_mode test_pattern of - -- See if the tokens match any single path component - TestMatchMode -> path_to_consider - -- See if the tokens match any prefix of the path - PathMatchMode -> map pathToString $ inits path_to_consider + tokens_regex :: Regex + tokens_regex = makeRegex $ buildTokenRegex (tp_tokens test_pattern) buildTokenRegex :: [Token] -> String diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasty-0.11.2.2/tasty.cabal new/tasty-0.11.2.3/tasty.cabal --- old/tasty-0.11.2.2/tasty.cabal 2017-07-06 11:07:11.000000000 +0200 +++ new/tasty-0.11.2.3/tasty.cabal 2017-07-18 17:08:39.000000000 +0200 @@ -2,7 +2,7 @@ -- see http://haskell.org/cabal/users-guide/ name: tasty -version: 0.11.2.2 +version: 0.11.2.3 synopsis: Modern and extensible testing framework description: Tasty is a modern testing framework for Haskell. It lets you combine your unit tests, golden