projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'stable-2.6'
[ganeti-local]
/
htools
/
test.hs
diff --git
a/htools/test.hs
b/htools/test.hs
index
1892c36
..
eedefd3
100644
(file)
--- a/
htools/test.hs
+++ b/
htools/test.hs
@@
-28,6
+28,7
@@
module Main(main) where
import Data.Char
import Data.IORef
import Data.List
import Data.Char
import Data.IORef
import Data.List
+import Data.Maybe (fromMaybe)
import System.Console.GetOpt ()
import System.Environment (getArgs)
import System.Exit
import System.Console.GetOpt ()
import System.Environment (getArgs)
import System.Exit
@@
-46,6
+47,7
@@
options =
, oVerbose
, oShowVer
, oShowHelp
, oVerbose
, oShowVer
, oShowHelp
+ , oTestCount
]
fast :: Args
]
fast :: Args
@@
-121,6
+123,8
@@
allTests =
, (fast, testLoader)
, (fast, testTypes)
, (fast, testCLI)
, (fast, testLoader)
, (fast, testTypes)
, (fast, testCLI)
+ , (fast, testJSON)
+ , (fast, testLUXI)
, (slow, testCluster)
]
, (slow, testCluster)
]
@@
-141,8
+145,10
@@
transformTestOpts args opts = do
case vs of
[rng, size] -> return $ Just (read rng, read size)
_ -> fail "Invalid state given"
case vs of
[rng, size] -> return $ Just (read rng, read size)
_ -> fail "Invalid state given"
- return args { chatty = optVerbose opts > 1,
- replay = r
+ return args { chatty = optVerbose opts > 1
+ , replay = r
+ , maxSuccess = fromMaybe (maxSuccess args) (optTestCount opts)
+ , maxDiscard = fromMaybe (maxDiscard args) (optTestCount opts)
}
main :: IO ()
}
main :: IO ()