summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-haskell/testpack/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-haskell/testpack/files')
-rw-r--r--dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch31
-rw-r--r--dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.6.patch45
-rw-r--r--dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.7.patch182
-rw-r--r--dev-haskell/testpack/files/testpack-2.1.3.0-qc28.patch139
4 files changed, 397 insertions, 0 deletions
diff --git a/dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch b/dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch
new file mode 100644
index 000000000000..7fdb372be8a5
--- /dev/null
+++ b/dev-haskell/testpack/files/testpack-2.1.2-quickcheck-2.5.patch
@@ -0,0 +1,31 @@
+--- testpack-2.1.2-orig/src/Test/HUnit/Tools.hs 2012-02-29 09:20:32.000000000 +1100
++++ testpack-2.1.2/src/Test/HUnit/Tools.hs 2012-07-09 09:03:53.104931180 +1000
+@@ -128,7 +128,13 @@
+ > q "Integer -> Int (safe bounds)" prop_integer_to_int_pass]
+ -}
+ qc2hu :: QC.Testable a => Int -> String -> a -> HU.Test
+-qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, maxDiscard = 20000})
++qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest,
++#if MIN_VERSION_QuickCheck(2,5,0)
++ maxDiscardRatio = if maxTest /= 0 then 20000 `div` maxTest else 10
++#else
++ maxDiscard = 20000
++#endif
++ })
+
+ {- | Run verbose tests. Example:
+
+@@ -174,7 +180,12 @@
+ Just (rnd,_) -> return rnd
+ test MkState{ terminal = tm
+ , maxSuccessTests = maxSuccess args
+- , maxDiscardedTests = maxDiscard args
++ , maxDiscardedTests =
++#if MIN_VERSION_QuickCheck(2,5,0)
++ maxDiscardRatio args * maxSuccess args
++#else
++ maxDiscard args
++#endif
+ , computeSize = case replay args of
+ Nothing -> \n d -> (n * maxSize args)
+ `div` maxSuccess args
diff --git a/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.6.patch b/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.6.patch
new file mode 100644
index 000000000000..4f39ce03e2ff
--- /dev/null
+++ b/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.6.patch
@@ -0,0 +1,45 @@
+--- testpack-2.1.2.1-orig/testpack.cabal 2013-02-26 02:03:46.000000000 +1100
++++ testpack-2.1.2.1/testpack.cabal 2013-03-14 12:10:12.741512817 +1100
+@@ -39,7 +39,7 @@
+
+ Build-Depends: base >= 3 && < 5,
+ mtl, HUnit,
+- QuickCheck >= 2.1.0.3 && < 2.5
++ QuickCheck >= 2.1.0.3
+
+ If flag(splitBase)
+ Build-Depends: base >= 3 && < 5, containers, random
+--- testpack-2.1.2-quickcheck-2.5/src/Test/HUnit/Tools.hs 2012-07-09 09:03:53.104931180 +1000
++++ testpack-2.1.2.1/src/Test/HUnit/Tools.hs 2013-03-14 12:51:13.403489351 +1100
+@@ -169,10 +169,15 @@
+ -- | Tests a property, using test arguments, produces a test result, and prints the results to 'stdout'.
+ localquickCheckWithResult :: Testable prop => Args -> prop -> IO Result
+ localquickCheckWithResult args p =
+- do
+ #if MIN_VERSION_QuickCheck(2,3,0)
++#if MIN_VERSION_QuickCheck(2,6,0)
++ (if chatty args then withStdioTerminal else withNullTerminal) $ \tm -> do
++#else
++ do
+ tm <- if chatty args then newStdioTerminal else newNullTerminal
++#endif
+ #else
++ do
+ tm <- newTerminal
+ #endif
+ rnd <- case replay args of
+--- testpack-2.1.2.1-orig/src/Test/QuickCheck/Tools.hs 2013-02-26 02:03:46.000000000 +1100
++++ testpack-2.1.2.1/src/Test/QuickCheck/Tools.hs 2013-03-14 12:46:14.922492197 +1100
+@@ -23,8 +23,12 @@
+
+ )
+ where
++#if MIN_VERSION_QuickCheck(2,6,0)
++import Test.QuickCheck.Property (Result(..), callbacks, expect, interrupted, ok, reason, stamp)
++#else
+ import Test.QuickCheck hiding (Result, reason)
+ import Test.QuickCheck.Property
++#endif
+
+ {- | Compare two values. If same, the test passes. If different, the result indicates
+ what was expected and what was received as part of the error. -}
diff --git a/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.7.patch b/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.7.patch
new file mode 100644
index 000000000000..62271f344c26
--- /dev/null
+++ b/dev-haskell/testpack/files/testpack-2.1.2.1-quickcheck-2.7.patch
@@ -0,0 +1,182 @@
+--- testpack-2.1.2.1-orig/testpack.cabal 2013-02-26 02:03:46.000000000 +1100
++++ testpack-2.1.2.1/testpack.cabal 2014-07-03 20:47:34.432871930 +1000
+@@ -39,7 +39,7 @@
+
+ Build-Depends: base >= 3 && < 5,
+ mtl, HUnit,
+- QuickCheck >= 2.1.0.3 && < 2.5
++ QuickCheck >= 2.1.0.3 && < 2.8
+
+ If flag(splitBase)
+ Build-Depends: base >= 3 && < 5, containers, random
+--- testpack-2.1.2.1-orig/src/Test/HUnit/Tools.hs 2013-02-26 02:03:46.000000000 +1100
++++ testpack-2.1.2.1/src/Test/HUnit/Tools.hs 2014-07-03 21:01:50.373614959 +1000
+@@ -25,7 +25,14 @@
+ import Test.QuickCheck.Property hiding (Result(reason))
+ import qualified Control.Exception
+ import qualified Test.HUnit as HU
+-import System.Random
++#if MIN_VERSION_QuickCheck(2,7,0)
++import Test.QuickCheck.Random (newQCGen, QCGen(..))
++import System.Random (split)
++#else
++import System.Random (newStdGen, StdGen(..), split)
++#define newStdGen newQCGen
++#define StdGen QCGen
++#endif
+ import System.IO
+ import Text.Printf
+
+@@ -96,7 +103,7 @@
+
+ {-
+ -- | modified version of the tests function from Test.QuickCheck
+-tests :: Args -> Gen Result -> StdGen -> Int -> Int -> [[String]] -> IO ()
++tests :: Args -> Gen Result -> QCGen -> Int -> Int -> [[String]] -> IO ()
+ tests config gen rnd0 ntest nfail stamps
+ | ntest == maxSuccess config = return ()
+ | nfail == maxDiscard config = assertFailure $ "Arguments exhausted after " ++ show ntest ++ " tests."
+@@ -128,7 +135,13 @@
+ > q "Integer -> Int (safe bounds)" prop_integer_to_int_pass]
+ -}
+ qc2hu :: QC.Testable a => Int -> String -> a -> HU.Test
+-qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest, maxDiscard = 20000})
++qc2hu maxTest = qccheck (stdArgs {maxSuccess = maxTest,
++#if MIN_VERSION_QuickCheck(2,5,0)
++ maxDiscardRatio = if maxTest /= 0 then 20000 `div` maxTest else 10
++#else
++ maxDiscard = 20000
++#endif
++ })
+
+ {- | Run verbose tests. Example:
+
+@@ -163,18 +176,28 @@
+ -- | Tests a property, using test arguments, produces a test result, and prints the results to 'stdout'.
+ localquickCheckWithResult :: Testable prop => Args -> prop -> IO Result
+ localquickCheckWithResult args p =
+- do
+ #if MIN_VERSION_QuickCheck(2,3,0)
++#if MIN_VERSION_QuickCheck(2,6,0)
++ (if chatty args then withStdioTerminal else withNullTerminal) $ \tm -> do
++#else
++ do
+ tm <- if chatty args then newStdioTerminal else newNullTerminal
++#endif
+ #else
++ do
+ tm <- newTerminal
+ #endif
+ rnd <- case replay args of
+- Nothing -> newStdGen
++ Nothing -> newQCGen
+ Just (rnd,_) -> return rnd
+ test MkState{ terminal = tm
+ , maxSuccessTests = maxSuccess args
+- , maxDiscardedTests = maxDiscard args
++ , maxDiscardedTests =
++#if MIN_VERSION_QuickCheck(2,5,0)
++ maxDiscardRatio args * maxSuccess args
++#else
++ maxDiscard args
++#endif
+ , computeSize = case replay args of
+ Nothing -> \n d -> (n * maxSize args)
+ `div` maxSuccess args
+@@ -190,17 +213,23 @@
+ #endif
+ , numSuccessShrinks = 0
+ , numTryShrinks = 0
++#if MIN_VERSION_QuickCheck(2,7,0)
++ , numRecentlyDiscardedTests = 0
++ , numTotTryShrinks = 0
++ } (unGen (unProperty (property p)))
++#else
+ } (unGen (property p))
++#endif
+ where
+ --------------------------------------------------------------------------
+ -- main test loop
+- test :: State -> (StdGen -> Int -> Prop) -> IO Result
++ test :: State -> (QCGen -> Int -> Prop) -> IO Result
+ test st f
+ | numSuccessTests st >= maxSuccessTests st = doneTesting st f
+ | numDiscardedTests st >= maxDiscardedTests st = giveUp st f
+ | otherwise = runATest st f
+
+- doneTesting :: State -> (StdGen -> Int -> Prop) -> IO Result
++ doneTesting :: State -> (QCGen -> Int -> Prop) -> IO Result
+ doneTesting st f =
+ do
+ #if MIN_VERSION_QuickCheck(2,3,0)
+@@ -221,7 +250,7 @@
+ #endif
+ }
+
+- giveUp :: State -> (StdGen -> Int -> Prop) -> IO Result
++ giveUp :: State -> (QCGen -> Int -> Prop) -> IO Result
+ giveUp st f =
+ do
+ #if MIN_VERSION_QuickCheck(2,3,0)
+@@ -234,7 +263,7 @@
+ #endif
+ }
+
+- runATest :: State -> (StdGen -> Int -> Prop) -> IO Result
++ runATest :: State -> (QCGen -> Int -> Prop) -> IO Result
+ runATest st f =
+ do
+ let size = computeSize st (numSuccessTests st) (numDiscardedTests st)
+@@ -266,7 +295,12 @@
+ Just False -> -- failed test
+ do
+ #if MIN_VERSION_QuickCheck(2,3,0)
++#if MIN_VERSION_QuickCheck(2,3,0)
++ (numShrinks, totFailed, lastFailed) <- foundFailure st res ts
++#else
+ numShrinks <- foundFailure st res ts
++#endif
++
+ theOutput <- terminalOutput (terminal st)
+ #else
+ foundFailure st res ts
+@@ -288,5 +322,9 @@
+ , numShrinks = numShrinks
+ , output = theOutput
+ #endif
++#if MIN_VERSION_QuickCheck(2,7,0)
++ , numShrinkTries = totFailed
++ , numShrinkFinal = lastFailed
++#endif
+ }
+ where (rnd1,rnd2) = split (randomSeed st)
+--- testpack-2.1.2.1-orig/src/Test/QuickCheck/Tools.hs 2013-02-26 02:03:46.000000000 +1100
++++ testpack-2.1.2.1/src/Test/QuickCheck/Tools.hs 2014-07-03 21:01:23.932306995 +1000
+@@ -23,15 +23,27 @@
+
+ )
+ where
++#if MIN_VERSION_QuickCheck(2,6,0)
++import Test.QuickCheck.Property (Result(..), callbacks, expect, theException, ok, reason, stamp)
++#if MIN_VERSION_QuickCheck(2,7,0)
++#else
++import Test.QuickCheck.Property (Result(..), callbacks, expect, interrupted, ok, reason, stamp)
++#endif
++#else
+ import Test.QuickCheck hiding (Result, reason)
+ import Test.QuickCheck.Property
++#endif
+
+ {- | Compare two values. If same, the test passes. If different, the result indicates
+ what was expected and what was received as part of the error. -}
+ (@=?) :: (Eq a, Show a) => a -> a -> Result
+ expected @=? actual =
+ MkResult {ok = Just (expected == actual),
++#if MIN_VERSION_QuickCheck(2,7,0)
++ expect = True, theException = Nothing,
++#else
+ expect = True, interrupted = False,
++#endif
+ reason = "Result: expected " ++ show expected ++ ", got " ++ show actual,
+ stamp = [], callbacks = []}
+
diff --git a/dev-haskell/testpack/files/testpack-2.1.3.0-qc28.patch b/dev-haskell/testpack/files/testpack-2.1.3.0-qc28.patch
new file mode 100644
index 000000000000..1bc9537f5d2a
--- /dev/null
+++ b/dev-haskell/testpack/files/testpack-2.1.3.0-qc28.patch
@@ -0,0 +1,139 @@
+diff --git a/src/Test/HUnit/Tools.hs b/src/Test/HUnit/Tools.hs
+index 2b66548..a24a510 100644
+--- a/src/Test/HUnit/Tools.hs
++++ b/src/Test/HUnit/Tools.hs
+@@ -18,9 +18,9 @@ module Test.HUnit.Tools (assertRaises, mapassertEqual,
+ where
+ import Test.QuickCheck as QC
+ import Test.QuickCheck.Text
+-import Test.QuickCheck.Test
++import Test.QuickCheck.Test as TQT
+ import Test.QuickCheck.Gen
+-import Test.QuickCheck.State
++import Test.QuickCheck.State as TQS
+ import qualified Test.QuickCheck.Property as P
+ import Test.QuickCheck.Property hiding (Result(reason))
+ import qualified Control.Exception
+@@ -33,6 +33,9 @@ import System.Random (newStdGen, StdGen(..), split)
+ #define newStdGen newQCGen
+ #define StdGen QCGen
+ #endif
++#if MIN_VERSION_QuickCheck(2,8,0)
++import qualified Data.Map as Map
++#endif
+ import System.IO
+ import Text.Printf
+
+@@ -205,6 +208,9 @@ localquickCheckWithResult args p =
+ Just (_,s) -> \_ _ -> s
+ , numSuccessTests = 0
+ , numDiscardedTests = 0
++#if MIN_VERSION_QuickCheck(2,8,0)
++ , TQS.labels = Map.empty
++#endif
+ , collected = []
+ , expectedFailure = False
+ , randomSeed = rnd
+@@ -236,14 +242,14 @@ localquickCheckWithResult args p =
+ theOutput <- terminalOutput (terminal st)
+ #endif
+ if expectedFailure st then
+- return Success{ labels = summary st
++ return Success{ TQT.labels = summary st
+ #if MIN_VERSION_QuickCheck(2,3,0)
+ , numTests = numSuccessTests st
+ , output = theOutput
+ #endif
+ }
+ else
+- return NoExpectedFailure{ labels = summary st
++ return NoExpectedFailure{ TQT.labels = summary st
+ #if MIN_VERSION_QuickCheck(2,3,0)
+ , numTests = numSuccessTests st
+ , output = theOutput
+@@ -257,7 +263,7 @@ localquickCheckWithResult args p =
+ theOutput <- terminalOutput (terminal st)
+ #endif
+ return GaveUp{ numTests = numSuccessTests st
+- , labels = summary st
++ , TQT.labels = summary st
+ #if MIN_VERSION_QuickCheck(2,3,0)
+ , output = theOutput
+ #endif
+@@ -306,7 +312,7 @@ localquickCheckWithResult args p =
+ foundFailure st res ts
+ #endif
+ if not (expect res) then
+- return Success{ labels = summary st
++ return Success{ TQT.labels = summary st
+ #if MIN_VERSION_QuickCheck(2,3,0)
+ , numTests = numSuccessTests st+1
+ , output = theOutput
+@@ -316,7 +322,7 @@ localquickCheckWithResult args p =
+ return Failure{ usedSeed = randomSeed st -- correct! (this will be split first)
+ , usedSize = size
+ , reason = P.reason res
+- , labels = summary st
++ , TQT.labels = summary st
+ #if MIN_VERSION_QuickCheck(2,3,0)
+ , numTests = numSuccessTests st + 1
+ , numShrinks = numShrinks
+diff --git a/src/Test/QuickCheck/Tools.hs b/src/Test/QuickCheck/Tools.hs
+index 712c9bf..506686f 100644
+--- a/src/Test/QuickCheck/Tools.hs
++++ b/src/Test/QuickCheck/Tools.hs
+@@ -20,34 +20,18 @@ Written by John Goerzen, jgoerzen\@complete.org
+ module Test.QuickCheck.Tools (-- * Comparisons
+ (@=?),
+ (@?=)
+-
+ )
+ where
+-#if MIN_VERSION_QuickCheck(2,6,0)
+-import Test.QuickCheck.Property (Result(..), callbacks, expect, theException, ok, reason, stamp)
+-#if MIN_VERSION_QuickCheck(2,7,0)
+-#else
+-import Test.QuickCheck.Property (Result(..), callbacks, expect, interrupted, ok, reason, stamp)
+-#endif
+-#else
+-import Test.QuickCheck hiding (Result, reason)
+-import Test.QuickCheck.Property
+-#endif
++
++import qualified Test.QuickCheck.Property as P
+
+ {- | Compare two values. If same, the test passes. If different, the result indicates
+ what was expected and what was received as part of the error. -}
+-(@=?) :: (Eq a, Show a) => a -> a -> Result
++(@=?) :: (Eq a, Show a) => a -> a -> P.Result
+ expected @=? actual =
+- MkResult {ok = Just (expected == actual),
+-#if MIN_VERSION_QuickCheck(2,7,0)
+- expect = True, theException = Nothing,
+-#else
+- expect = True, interrupted = False,
+-#endif
+- reason = "Result: expected " ++ show expected ++ ", got " ++ show actual,
+- stamp = [], callbacks = []}
+-
++ P.result { P.ok = Just (expected == actual)
++ , P.reason = "Result: expected " ++ show expected ++ ", got " ++ show actual
++ }
+ {- | Like '@=?', but with args in a different order. -}
+-(@?=) :: (Eq a, Show a) => a -> a -> Result
++(@?=) :: (Eq a, Show a) => a -> a -> P.Result
+ (@?=) = flip (@=?)
+-
+diff --git a/testpack.cabal b/testpack.cabal
+index 0873b33..dab77d9 100644
+--- a/testpack.cabal
++++ b/testpack.cabal
+@@ -46,7 +46,7 @@ Library
+
+ Build-Depends: base >= 3 && < 5,
+ mtl, HUnit,
+- QuickCheck >= 2.1.0.3 && < 2.8
++ QuickCheck >= 2.1.0.3 && < 2.9
+
+ If flag(splitBase)
+ Build-Depends: base >= 3 && < 5, containers, random