Add a server-side Luxi implementation
[ganeti-local] / htools / test.hs
index 1892c36..6e43427 100644 (file)
@@ -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
@@ -121,6 +123,9 @@ allTests =
   , (fast, testLoader)
   , (fast, testTypes)
   , (fast, testCLI)
+  , (fast, testJSON)
+  , (fast, testLUXI)
+  , (fast, testSsconf)
   , (slow, testCluster)
   ]
 
@@ -141,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 ()