Add note in admin guide about drbd stacked devices
[ganeti-local] / htools / test.hs
index 3879bdb..6e43427 100644 (file)
@@ -4,7 +4,7 @@
 
 {-
 
-Copyright (C) 2009, 2011 Google Inc.
+Copyright (C) 2009, 2011, 2012 Google Inc.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -28,6 +28,7 @@ module Main(main) where
 import Data.Char
 import Data.IORef
 import Data.List
+import Data.Maybe (fromMaybe)
 import System.Console.GetOpt ()
 import System.Environment (getArgs)
 import System.Exit
@@ -46,6 +47,7 @@ options =
   , oVerbose
   , oShowVer
   , oShowHelp
+  , oTestCount
   ]
 
 fast :: Args
@@ -115,10 +117,15 @@ allTests =
   , (fast, testInstance)
   , (fast, testNode)
   , (fast, testText)
+  , (fast, testSimu)
   , (fast, testOpCodes)
   , (fast, testJobs)
   , (fast, testLoader)
   , (fast, testTypes)
+  , (fast, testCLI)
+  , (fast, testJSON)
+  , (fast, testLUXI)
+  , (fast, testSsconf)
   , (slow, testCluster)
   ]
 
@@ -139,8 +146,10 @@ transformTestOpts args opts = do
            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 ()