diff -Nru haskell-test-framework-0.5/debian/changelog haskell-test-framework-0.8.0.3/debian/changelog --- haskell-test-framework-0.5/debian/changelog 2012-02-10 03:17:45.000000000 +0000 +++ haskell-test-framework-0.8.0.3/debian/changelog 2014-06-13 23:12:37.000000000 +0000 @@ -1,3 +1,64 @@ +haskell-test-framework (0.8.0.3-1ubuntu1) precise; urgency=medium + + * Backport to precise. + + -- Marcus Hoffmann Sat, 14 Jun 2014 01:12:37 +0200 + +haskell-test-framework (0.8.0.3-1build3) trusty; urgency=medium + + * Rebuild for new GHC ABIs. + + -- Colin Watson Tue, 04 Feb 2014 18:57:08 +0000 + +haskell-test-framework (0.8.0.3-1build2) trusty; urgency=medium + + * Rebuild for new GHC ABIs. + + -- Colin Watson Tue, 31 Dec 2013 01:47:17 +0000 + +haskell-test-framework (0.8.0.3-1build1) trusty; urgency=low + + * Rebuild for new GHC ABIs. + + -- Colin Watson Thu, 12 Dec 2013 15:51:11 +0000 + +haskell-test-framework (0.8.0.3-1) unstable; urgency=low + + [ Joachim Breitner ] + * Adjust watch file to new hackage layout + + [ Clint Adams ] + * New upstream version. + + -- Clint Adams Tue, 26 Nov 2013 08:24:02 -0500 + +haskell-test-framework (0.8-1) unstable; urgency=low + + * New upstream release + + -- Joachim Breitner Sat, 15 Jun 2013 12:11:59 +0200 + +haskell-test-framework (0.6-3) unstable; urgency=low + + * Enable compat level 9 + + -- Joachim Breitner Fri, 24 May 2013 12:52:14 +0200 + +haskell-test-framework (0.6-2) experimental; urgency=low + + * Depend on haskell-devscripts 0.8.13 to ensure this packages is built + against experimental + * Bump standards version, no change + * Depend on libghc-extensible-exceptions-dev + + -- Joachim Breitner Wed, 17 Oct 2012 16:09:56 +0200 + +haskell-test-framework (0.6-1) unstable; urgency=low + + * New upstream version. + + -- Kiwamu Okabe Sun, 15 Apr 2012 12:52:59 +0900 + haskell-test-framework (0.5-1) unstable; urgency=low * New upstream version. diff -Nru haskell-test-framework-0.5/debian/compat haskell-test-framework-0.8.0.3/debian/compat --- haskell-test-framework-0.5/debian/compat 2012-02-10 03:17:15.000000000 +0000 +++ haskell-test-framework-0.8.0.3/debian/compat 2014-06-13 23:12:37.000000000 +0000 @@ -1 +1 @@ -7 \ No newline at end of file +9 diff -Nru haskell-test-framework-0.5/debian/control haskell-test-framework-0.8.0.3/debian/control --- haskell-test-framework-0.5/debian/control 2012-02-10 03:18:45.000000000 +0000 +++ haskell-test-framework-0.8.0.3/debian/control 2014-06-13 23:12:37.000000000 +0000 @@ -3,8 +3,8 @@ Section: haskell Maintainer: Debian Haskell Group Uploaders: Kiwamu Okabe -Build-Depends: debhelper (>= 7.0), - haskell-devscripts (>= 0.8), +Build-Depends: debhelper (>= 9), + haskell-devscripts (>= 0.8.13), cdbs, ghc, ghc-prof, @@ -27,11 +27,10 @@ libghc-random-doc, libghc-regex-posix-doc, libghc-xml-doc -Standards-Version: 3.9.2 +Standards-Version: 3.9.5 Homepage: http://batterseapower.github.com/test-framework/ Vcs-Darcs: http://darcs.debian.org/pkg-haskell/haskell-test-framework Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/haskell-test-framework -DM-Upload-Allowed: yes Package: libghc-test-framework-dev Architecture: any diff -Nru haskell-test-framework-0.5/debian/watch haskell-test-framework-0.8.0.3/debian/watch --- haskell-test-framework-0.5/debian/watch 2012-02-10 03:18:51.000000000 +0000 +++ haskell-test-framework-0.8.0.3/debian/watch 2014-06-13 23:12:37.000000000 +0000 @@ -1,5 +1,2 @@ version=3 -opts="downloadurlmangle=s|archive/([\w\d_-]+)/([\d\.]+)/|archive/$1/$2/$1-$2.tar.gz|,\ -filenamemangle=s|(.*)/$|test-framework-$1.tar.gz|" \ - http://hackage.haskell.org/packages/archive/test-framework \ - ([\d\.]*\d)/ +http://hackage.haskell.org/package/test-framework/distro-monitor .*-([0-9\.]+).(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff -Nru haskell-test-framework-0.5/Test/Framework/Core.hs haskell-test-framework-0.8.0.3/Test/Framework/Core.hs --- haskell-test-framework-0.5/Test/Framework/Core.hs 2012-02-01 10:58:25.000000000 +0000 +++ haskell-test-framework-0.8.0.3/Test/Framework/Core.hs 2013-10-09 00:25:35.000000000 +0000 @@ -1,10 +1,12 @@ -{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE UndecidableInstances, DeriveDataTypeable #-} module Test.Framework.Core where import Test.Framework.Improving import Test.Framework.Options +import Control.Arrow (first, second) import Control.Concurrent.MVar +import Data.Typeable -- | Something like the result of a test: works in concert with 'Testlike'. @@ -35,10 +37,11 @@ -- -- For an example of how to use test-framework, please see -- -data Test = forall i r t. Testlike i r t => Test TestName t -- ^ A single test of some particular type +data Test = forall i r t. + (Testlike i r t, Typeable t) => Test TestName t -- ^ A single test of some particular type | TestGroup TestName [Test] -- ^ Assemble a number of tests into a cohesive group | PlusTestOptions TestOptions Test -- ^ Add some options to child tests - | BuildTest (IO Test) -- ^ Convenience for creating tests from an 'IO' action + | BuildTestBracketed (IO (Test, IO ())) -- ^ Convenience for creating tests from an 'IO' action, with cleanup -- | Assemble a number of tests into a cohesive group testGroup :: TestName -> [Test] -> Test @@ -50,23 +53,28 @@ -- | Convenience for creating tests from an 'IO' action buildTest :: IO Test -> Test -buildTest = BuildTest +buildTest mx = BuildTestBracketed (fmap (flip (,) (return ())) mx) + +-- | Convenience for creating tests from an 'IO' action, with a cleanup handler for when tests are finished +buildTestBracketed :: IO (Test, IO ()) -> Test +buildTestBracketed = BuildTestBracketed data MutuallyExcluded t = ME (MVar ()) t + deriving Typeable -- This requires UndecidableInstances, but I think it can't be made inconsistent? instance Testlike i r t => Testlike i r (MutuallyExcluded t) where - runTest cto (ME mvar x) = withMVar mvar $ \() -> runTest cto x + runTest cto (ME mvar x) = fmap (second (\act -> withMVar mvar $ \() -> act)) $ runTest cto x testTypeName ~(ME _ x) = testTypeName x -- | Mark all tests in this portion of the tree as mutually exclusive, so only one runs at a time {-# NOINLINE mutuallyExclusive #-} mutuallyExclusive :: Test -> Test -mutuallyExclusive init_t = BuildTest $ do +mutuallyExclusive init_t = buildTest $ do mvar <- newMVar () - let go (Test tn t) = Test tn (ME mvar t) - go (TestGroup tn ts) = TestGroup tn (map go ts) - go (PlusTestOptions to t) = PlusTestOptions to (go t) - go (BuildTest build) = BuildTest (fmap go build) + let go (Test tn t) = Test tn (ME mvar t) + go (TestGroup tn ts) = TestGroup tn (map go ts) + go (PlusTestOptions to t) = PlusTestOptions to (go t) + go (BuildTestBracketed build) = BuildTestBracketed (fmap (first go) build) return (go init_t) diff -Nru haskell-test-framework-0.5/Test/Framework/Improving.hs haskell-test-framework-0.8.0.3/Test/Framework/Improving.hs --- haskell-test-framework-0.5/Test/Framework/Improving.hs 2012-02-01 10:58:25.000000000 +0000 +++ haskell-test-framework-0.8.0.3/Test/Framework/Improving.hs 2013-10-09 00:25:35.000000000 +0000 @@ -1,6 +1,6 @@ module Test.Framework.Improving ( (:~>)(..), bimapImproving, improvingLast, consumeImproving, - ImprovingIO, yieldImprovement, runImprovingIO, liftIO, + ImprovingIO, yieldImprovement, runImprovingIO, tunnelImprovingIO, liftIO, timeoutImprovingIO, maybeTimeoutImprovingIO ) where @@ -49,6 +49,10 @@ yield writeChan chan (Left improvement) +-- NB: could have a more general type but it would be impredicative +tunnelImprovingIO :: ImprovingIO i f (ImprovingIO i f a -> IO a) +tunnelImprovingIO = IIO $ \chan -> return $ \iio -> unIIO iio chan + runImprovingIO :: ImprovingIO i f f -> IO (i :~> f, IO ()) runImprovingIO iio = do chan <- newChan diff -Nru haskell-test-framework-0.5/Test/Framework/Options.hs haskell-test-framework-0.8.0.3/Test/Framework/Options.hs --- haskell-test-framework-0.5/Test/Framework/Options.hs 2012-02-01 10:58:25.000000000 +0000 +++ haskell-test-framework-0.8.0.3/Test/Framework/Options.hs 2013-10-09 00:25:35.000000000 +0000 @@ -15,6 +15,8 @@ -- ^ Maximum number of tests to generate when using something like QuickCheck topt_maximum_unsuitable_generated_tests :: f Int, -- ^ Maximum number of unsuitable tests to consider before giving up when using something like QuickCheck + topt_maximum_test_size :: f Int, + -- ^ Maximum size of generated tests when using something like QuickCheck topt_maximum_test_depth :: f Int, -- ^ Maximum depth of generated tests when using something like SmallCheck topt_timeout :: f (Maybe Int) @@ -26,6 +28,7 @@ topt_seed = Nothing, topt_maximum_generated_tests = Nothing, topt_maximum_unsuitable_generated_tests = Nothing, + topt_maximum_test_size = Nothing, topt_maximum_test_depth = Nothing, topt_timeout = Nothing } @@ -34,6 +37,7 @@ topt_seed = getLast (mappendBy (Last . topt_seed) to1 to2), topt_maximum_generated_tests = getLast (mappendBy (Last . topt_maximum_generated_tests) to1 to2), topt_maximum_unsuitable_generated_tests = getLast (mappendBy (Last . topt_maximum_unsuitable_generated_tests) to1 to2), + topt_maximum_test_size = getLast (mappendBy (Last . topt_maximum_test_size) to1 to2), topt_maximum_test_depth = getLast (mappendBy (Last . topt_maximum_test_depth) to1 to2), topt_timeout = getLast (mappendBy (Last . topt_timeout) to1 to2) } diff -Nru haskell-test-framework-0.5/Test/Framework/Runners/API.hs haskell-test-framework-0.8.0.3/Test/Framework/Runners/API.hs --- haskell-test-framework-0.5/Test/Framework/Runners/API.hs 1970-01-01 00:00:00.000000000 +0000 +++ haskell-test-framework-0.8.0.3/Test/Framework/Runners/API.hs 2013-10-09 00:25:35.000000000 +0000 @@ -0,0 +1,8 @@ +-- | This module exports everything that you need to be able to create your own test runner. +module Test.Framework.Runners.API ( + module Test.Framework.Runners.Options, + TestRunner(..), runTestTree + ) where + +import Test.Framework.Runners.Options +import Test.Framework.Runners.Core diff -Nru haskell-test-framework-0.5/Test/Framework/Runners/Console/Utilities.hs haskell-test-framework-0.8.0.3/Test/Framework/Runners/Console/Utilities.hs --- haskell-test-framework-0.5/Test/Framework/Runners/Console/Utilities.hs 2012-02-01 10:58:25.000000000 +0000 +++ haskell-test-framework-0.8.0.3/Test/Framework/Runners/Console/Utilities.hs 2013-10-09 00:25:35.000000000 +0000 @@ -5,7 +5,7 @@ import System.Console.ANSI import System.IO -import Control.Exception.Extensible +import Control.Exception (bracket) hideCursorDuring :: IO a -> IO a diff -Nru haskell-test-framework-0.5/Test/Framework/Runners/Console.hs haskell-test-framework-0.8.0.3/Test/Framework/Runners/Console.hs --- haskell-test-framework-0.5/Test/Framework/Runners/Console.hs 2012-02-01 10:58:25.000000000 +0000 +++ haskell-test-framework-0.8.0.3/Test/Framework/Runners/Console.hs 2013-10-09 00:25:35.000000000 +0000 @@ -1,5 +1,8 @@ +{-# OPTIONS_GHC -fno-warn-orphans #-} + module Test.Framework.Runners.Console ( defaultMain, defaultMainWithArgs, defaultMainWithOpts, + SuppliedRunnerOptions, optionsDescription, interpretArgs, interpretArgsOrExit ) where @@ -14,6 +17,7 @@ import Test.Framework.Seed import Test.Framework.Utilities +import Control.Monad (when) import System.Console.GetOpt import System.Environment import System.Exit @@ -21,7 +25,7 @@ import Data.Monoid - +#if !MIN_VERSION_base(4,7,0) instance Functor OptDescr where fmap f (Option a b arg_descr c) = Option a b (fmap f arg_descr) c @@ -29,11 +33,14 @@ fmap f (NoArg a) = NoArg (f a) fmap f (ReqArg g s) = ReqArg (f . g) s fmap f (OptArg g s) = OptArg (f . g) s +#endif -- | @Nothing@ signifies that usage information should be displayed. -- @Just@ simply gives us the contribution to overall options by the command line option. type SuppliedRunnerOptions = Maybe RunnerOptions +-- | Options understood by test-framework. This can be used to add more +-- options to the tester executable. optionsDescription :: [OptDescr SuppliedRunnerOptions] optionsDescription = [ Option [] ["help"] @@ -52,6 +59,9 @@ Option [] ["maximum-unsuitable-generated-tests"] (ReqArg (\t -> mempty { ropt_test_options = Just (mempty { topt_maximum_unsuitable_generated_tests = Just (read t) }) }) "NUMBER") "how many unsuitable candidate tests something like QuickCheck should endure before giving up, by default", + Option ['s'] ["maximum-test-size"] + (ReqArg (\t -> mempty {ropt_test_options = Just (mempty { topt_maximum_test_size = Just (read t) }) }) "NUMBER") + "to what size something like QuickCheck should test the properties, by default", Option ['d'] ["maximum-test-depth"] (ReqArg (\t -> mempty { ropt_test_options = Just (mempty { topt_maximum_test_depth = Just (read t) }) }) "NUMBER") "to what depth something like SmallCheck should test the properties, by default", @@ -61,6 +71,9 @@ Option [] ["no-timeout"] (NoArg (mempty { ropt_test_options = Just (mempty { topt_timeout = Just Nothing }) })) "specifies that tests should be run without a timeout, by default", + Option ['l'] ["list-tests"] + (NoArg (mempty { ropt_list_only = Just True })) + "list available tests but don't run any; useful to guide subsequent --select-tests", Option ['t'] ["select-tests"] (ReqArg (\t -> mempty { ropt_test_patterns = Just [read t] }) "TEST-PATTERN") "only tests that match at least one glob pattern given by an instance of this argument will be run", @@ -87,7 +100,7 @@ interpretArgs args = do prog_name <- getProgName let usage_header = "Usage: " ++ prog_name ++ " [OPTIONS]" - + case getOpt Permute optionsDescription args of (oas, n, []) | Just os <- sequence oas -> return $ Right (mconcat os, n) (_, _, errs) -> return $ Left (concat errs ++ usageInfo usage_header optionsDescription) @@ -123,7 +136,11 @@ defaultMainWithOpts :: [Test] -> RunnerOptions -> IO () defaultMainWithOpts tests ropts = do let ropts' = completeRunnerOptions ropts - + + when (unK$ ropt_list_only ropts') $ do + putStr $ listTests tests + exitSuccess + -- Get a lazy list of the test results, as executed in parallel running_tests <- runTests ropts' tests @@ -135,17 +152,29 @@ -- Show those test results to the user as we get them fin_tests <- showRunTestsTop isplain (unK $ ropt_hide_successes ropts') running_tests let test_statistics' = gatherStatistics fin_tests - + -- Output XML report (if requested) case ropt_xml_output ropts' of K (Just file) -> XML.produceReport (unK (ropt_xml_nested ropts')) test_statistics' fin_tests >>= writeFile file _ -> return () - + -- Set the error code depending on whether the tests succeded or not exitWith $ if ts_no_failures test_statistics' then ExitSuccess else ExitFailure 1 +-- | Print out a list of available tests. +listTests :: [Test] -> String +listTests tests = "\ntest-framework: All available tests:\n"++ + "====================================\n"++ + concat (map (++"\n") (concatMap (showTest "") tests)) + where + showTest :: String -> Test -> [String] + showTest path (Test name _testlike) = [" "++path ++ name] + showTest path (TestGroup name gtests) = concatMap (showTest (path++":"++name)) gtests + showTest path (PlusTestOptions _ test) = showTest path test + showTest path (BuildTestBracketed _) = [" "++path ++ ""] + completeRunnerOptions :: RunnerOptions -> CompleteRunnerOptions completeRunnerOptions ro = RunnerOptions { @@ -155,5 +184,6 @@ ropt_xml_output = K $ ropt_xml_output ro `orElse` Nothing, ropt_xml_nested = K $ ropt_xml_nested ro `orElse` False, ropt_color_mode = K $ ropt_color_mode ro `orElse` ColorAuto, - ropt_hide_successes = K $ ropt_hide_successes ro `orElse` False + ropt_hide_successes = K $ ropt_hide_successes ro `orElse` False, + ropt_list_only = K $ ropt_list_only ro `orElse` False } diff -Nru haskell-test-framework-0.5/Test/Framework/Runners/Core.hs haskell-test-framework-0.8.0.3/Test/Framework/Runners/Core.hs --- haskell-test-framework-0.5/Test/Framework/Runners/Core.hs 2012-02-01 10:58:25.000000000 +0000 +++ haskell-test-framework-0.8.0.3/Test/Framework/Runners/Core.hs 2013-10-09 00:25:35.000000000 +0000 @@ -1,5 +1,6 @@ module Test.Framework.Runners.Core ( RunTest(..), RunningTest, SomeImproving(..), FinishedTest, runTests, + TestRunner(..), runTestTree ) where import Test.Framework.Core @@ -11,8 +12,12 @@ import Test.Framework.Seed import Test.Framework.Utilities +import Control.Concurrent.MVar +import Control.Exception (mask, finally, onException) +import Control.Monad import Data.Maybe import Data.Monoid +import Data.Typeable -- | A test that has been executed or is in the process of execution @@ -30,35 +35,87 @@ -> IO [RunningTest] runTests ropts tests = do let test_patterns = unK $ ropt_test_patterns ropts - use_test path name = null test_patterns || any (`testPatternMatches` (path ++ [name])) test_patterns - (run_tests, actions) <- runTests' use_test [] (unK $ ropt_test_options ropts) tests + test_options = unK $ ropt_test_options ropts + (run_tests, actions) <- runTests' $ map (runTestTree test_options test_patterns) tests _ <- executeOnPool (unK $ ropt_threads ropts) actions return run_tests +-- | 'TestRunner' class simplifies folding a 'Test'. You need to specify +-- the important semantic actions by instantiating this class, and +-- 'runTestTree' will take care of recursion and test filtering. +class TestRunner b where + -- | How to handle a single test + runSimpleTest :: (Testlike i r t, Typeable t) => TestOptions -> TestName -> t -> b + -- | How to skip a test that doesn't satisfy the pattern + skipTest :: b + -- | How to handle an IO test (created with 'buildTestBracketed') + runIOTest :: IO (b, IO ()) -> b + -- | How to run a test group + runGroup :: TestName -> [b] -> b + +-- | Run the test tree using a 'TestRunner' +runTestTree + :: TestRunner b + => TestOptions + -> [TestPattern] + -- ^ skip the tests that do not match any of these patterns, unless + -- the list is empty + -> Test + -> b +runTestTree initialOpts pats topTest = go initialOpts [] topTest + where + go opts path t = case t of + Test name testlike -> + if null pats || any (`testPatternMatches` (path ++ [name])) pats + then runSimpleTest opts name testlike + else skipTest + TestGroup name tests -> + let path' = path ++ [name] + in runGroup name $ map (go opts path') tests + PlusTestOptions extra_topts test -> go (opts `mappend` extra_topts) path test + BuildTestBracketed build -> + runIOTest $ onLeft (go opts path) `fmap` build + +newtype StdRunner = StdRunner { run :: IO (Maybe (RunningTest, [IO ()])) } + +instance TestRunner StdRunner where + runSimpleTest topts name testlike = StdRunner $ do + (result, action) <- runTest (completeTestOptions topts) testlike + return (Just (RunTest name (testTypeName testlike) (SomeImproving result), [action])) + + skipTest = StdRunner $ return Nothing + + runGroup name tests = StdRunner $ do + (results, actions) <- runTests' tests + return $ if null results then Nothing else Just ((RunTestGroup name results), actions) + + runIOTest ioTest = StdRunner $ mask $ \restore -> ioTest >>= \(StdRunner test, cleanup) -> do + mb_res <- restore test `onException` cleanup + case mb_res of + -- No sub-tests: perform the cleanup NOW + Nothing -> cleanup >> return Nothing + Just (run_test, actions) -> do + -- Sub-tests: perform the cleanup as soon as each of them have completed + (mvars, actions') <- liftM unzip $ forM actions $ \action -> do + mvar <- newEmptyMVar + return (mvar, action `finally` putMVar mvar ()) + -- NB: the takeMVar action MUST be last in the list because the returned actions are + -- scheduled left-to-right, and we want all the actions we depend on to be scheduled + -- before we wait for them to complete, or we might deadlock. + -- + -- FIXME: this is a bit of a hack because it uses one pool thread just waiting + -- for some other pool threads to complete! Switch to parallel-io? + return $ Just (run_test, actions' ++ [(cleanup >> mapM_ takeMVar mvars)]) -runTest' :: ([String] -> String -> Bool) -> [String] - -> TestOptions -> Test -> IO (Maybe (RunningTest, [IO ()])) -runTest' use_test path topts (Test name testlike) - | use_test path name = do - (result, action) <- runTest (completeTestOptions topts) testlike - return (Just (RunTest name (testTypeName testlike) (SomeImproving result), [action])) - | otherwise = return Nothing -runTest' use_test path topts (TestGroup name tests) = do - (results, actions) <- runTests' use_test (path ++ [name]) topts tests - return $ if null results then Nothing else Just ((RunTestGroup name results), actions) -runTest' use_test path topts (PlusTestOptions extra_topts test) = runTest' use_test path (topts `mappend` extra_topts) test -runTest' use_test path topts (BuildTest build) = build >>= runTest' use_test path topts - -runTests' :: ([String] -> String -> Bool) -> [String] - -> TestOptions -> [Test] -> IO ([RunningTest], [IO ()]) -runTests' use_test path topts = fmap (onRight concat . unzip . catMaybes) . mapM (runTest' use_test path topts) - +runTests' :: [StdRunner] -> IO ([RunningTest], [IO ()]) +runTests' = fmap (onRight concat . unzip . catMaybes) . mapM run completeTestOptions :: TestOptions -> CompleteTestOptions completeTestOptions to = TestOptions { topt_seed = K $ topt_seed to `orElse` RandomSeed, topt_maximum_generated_tests = K $ topt_maximum_generated_tests to `orElse` 100, topt_maximum_unsuitable_generated_tests = K $ topt_maximum_unsuitable_generated_tests to `orElse` 1000, + topt_maximum_test_size = K $ topt_maximum_test_size to `orElse` 100, topt_maximum_test_depth = K $ topt_maximum_test_depth to `orElse` 5, topt_timeout = K $ topt_timeout to `orElse` Nothing } diff -Nru haskell-test-framework-0.5/Test/Framework/Runners/Options.hs haskell-test-framework-0.8.0.3/Test/Framework/Runners/Options.hs --- haskell-test-framework-0.5/Test/Framework/Runners/Options.hs 2012-02-01 10:58:25.000000000 +0000 +++ haskell-test-framework-0.8.0.3/Test/Framework/Runners/Options.hs 2013-10-09 00:25:35.000000000 +0000 @@ -1,4 +1,7 @@ -module Test.Framework.Runners.Options where +module Test.Framework.Runners.Options ( + module Test.Framework.Runners.Options, + TestPattern + ) where import Test.Framework.Options import Test.Framework.Utilities @@ -17,7 +20,8 @@ ropt_xml_output :: f (Maybe FilePath), ropt_xml_nested :: f Bool, ropt_color_mode :: f ColorMode, - ropt_hide_successes :: f Bool + ropt_hide_successes :: f Bool, + ropt_list_only :: f Bool } instance Monoid (RunnerOptions' Maybe) where @@ -28,7 +32,8 @@ ropt_xml_output = Nothing, ropt_xml_nested = Nothing, ropt_color_mode = Nothing, - ropt_hide_successes = Nothing + ropt_hide_successes = Nothing, + ropt_list_only = Nothing } mappend ro1 ro2 = RunnerOptions { @@ -38,5 +43,6 @@ ropt_xml_output = mappendBy ropt_xml_output ro1 ro2, ropt_xml_nested = getLast (mappendBy (Last . ropt_xml_nested) ro1 ro2), ropt_color_mode = getLast (mappendBy (Last . ropt_color_mode) ro1 ro2), - ropt_hide_successes = getLast (mappendBy (Last . ropt_hide_successes) ro1 ro2) - } \ No newline at end of file + ropt_hide_successes = getLast (mappendBy (Last . ropt_hide_successes) ro1 ro2), + ropt_list_only = getLast (mappendBy (Last . ropt_list_only) ro1 ro2) + } diff -Nru haskell-test-framework-0.5/Test/Framework/Runners/XML/JUnitWriter.hs haskell-test-framework-0.8.0.3/Test/Framework/Runners/XML/JUnitWriter.hs --- haskell-test-framework-0.5/Test/Framework/Runners/XML/JUnitWriter.hs 2012-02-01 10:58:25.000000000 +0000 +++ haskell-test-framework-0.8.0.3/Test/Framework/Runners/XML/JUnitWriter.hs 2013-10-09 00:25:35.000000000 +0000 @@ -58,7 +58,7 @@ , ("name", id . suiteName) , ("tests", show . testCount) , ("time", show . time) - , ("timeStamp", fromMaybe "" . timeStamp) + , ("timestamp", fromMaybe "" . timeStamp) , ("id", fromMaybe "" . runId) , ("package", fromMaybe "" . package) ] diff -Nru haskell-test-framework-0.5/Test/Framework.hs haskell-test-framework-0.8.0.3/Test/Framework.hs --- haskell-test-framework-0.5/Test/Framework.hs 2012-02-01 10:58:25.000000000 +0000 +++ haskell-test-framework-0.8.0.3/Test/Framework.hs 2013-10-09 00:25:35.000000000 +0000 @@ -10,7 +10,7 @@ module Test.Framework.Seed ) where -import Test.Framework.Core (Test, TestName, testGroup, plusTestOptions, buildTest, mutuallyExclusive) +import Test.Framework.Core (Test, TestName, testGroup, plusTestOptions, buildTest, buildTestBracketed, mutuallyExclusive) import Test.Framework.Options import Test.Framework.Runners.Console import Test.Framework.Runners.Options diff -Nru haskell-test-framework-0.5/test-framework.cabal haskell-test-framework-0.8.0.3/test-framework.cabal --- haskell-test-framework-0.5/test-framework.cabal 2012-02-01 10:58:25.000000000 +0000 +++ haskell-test-framework-0.8.0.3/test-framework.cabal 2013-10-09 00:25:35.000000000 +0000 @@ -1,6 +1,6 @@ Name: test-framework -Version: 0.5 -Cabal-Version: >= 1.2.3 +Version: 0.8.0.3 +Cabal-Version: >= 1.6 Category: Testing Synopsis: Framework for running and organising tests, with HUnit and QuickCheck support Description: Allows tests such as QuickCheck properties and HUnit test cases to be assembled into test groups, run in @@ -9,14 +9,11 @@ License: BSD3 License-File: LICENSE Author: Max Bolingbroke -Maintainer: Max Bolingbroke -Homepage: http://batterseapower.github.com/test-framework/ +Maintainer: Libraries List +Homepage: https://batterseapower.github.io/test-framework/ +Bug-Reports: https://github.com/haskell/test-framework/issues/ Build-Type: Simple -Flag SplitBase - Description: Choose the new smaller, split-up base package - Default: True - Flag Tests Description: Build the tests Default: False @@ -28,6 +25,8 @@ Test.Framework.Providers.API Test.Framework.Runners.Console Test.Framework.Runners.Options + Test.Framework.Runners.TestPattern + Test.Framework.Runners.API Test.Framework.Seed Other-Modules: Test.Framework.Core @@ -41,7 +40,6 @@ Test.Framework.Runners.Core Test.Framework.Runners.Processors Test.Framework.Runners.Statistics - Test.Framework.Runners.TestPattern Test.Framework.Runners.ThreadPool Test.Framework.Runners.TimedConsumption Test.Framework.Runners.XML.JUnitWriter @@ -49,13 +47,10 @@ Test.Framework.Utilities Build-Depends: ansi-terminal >= 0.4.0, ansi-wl-pprint >= 0.5.1, - regex-posix >= 0.72, extensible-exceptions >= 0.1.1, + base >= 4.3 && < 5, random >= 1.0, containers >= 0.1, + regex-posix >= 0.72, old-locale >= 1.0, time >= 1.1.2, xml >= 1.3.5, hostname >= 1.0 - if flag(splitBase) - Build-Depends: base >= 3 && < 5, random >= 1.0, containers >= 0.1 - else - Build-Depends: base < 3 Extensions: CPP PatternGuards @@ -79,15 +74,12 @@ Buildable: False else Build-Depends: HUnit >= 1.2, QuickCheck >= 2.3 && < 2.5, + base >= 4.3 && < 5, random >= 1.0, containers >= 0.1, ansi-terminal >= 0.4.0, ansi-wl-pprint >= 0.5.1, - regex-posix >= 0.72, extensible-exceptions >= 0.1.1, + regex-posix >= 0.72, old-locale >= 1.0, time >= 1.1.2, xml >= 1.3.5, hostname >= 1.0, libxml >= 0.1.1, bytestring >= 0.9 - if flag(splitBase) - Build-Depends: base >= 3 && < 5, random >= 1.0, containers >= 0.1 - else - Build-Depends: base < 3 Extensions: CPP PatternGuards @@ -105,3 +97,7 @@ if impl(ghc) Cpp-Options: -DCOMPILER_GHC + +Source-Repository head + Type: git + Location: https://github.com/haskell/test-framework