From 1a5670d0fc6ee4640fc84b5abc01bf5efd85f5ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Mon, 2 Jan 2023 22:57:25 +0100 Subject: Split command line and test options --- src/Run/Monad.hs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/Run/Monad.hs') diff --git a/src/Run/Monad.hs b/src/Run/Monad.hs index 77e47ea..220ac46 100644 --- a/src/Run/Monad.hs +++ b/src/Run/Monad.hs @@ -2,7 +2,7 @@ module Run.Monad ( TestRun(..), TestEnv(..), TestState(..), - Options(..), defaultOptions, + TestOptions(..), defaultTestOptions, Failed(..), ) where @@ -28,7 +28,7 @@ newtype TestRun a = TestRun { fromTestRun :: ReaderT (TestEnv, TestState) (Excep data TestEnv = TestEnv { teOutput :: Output , teFailed :: TVar (Maybe Failed) - , teOptions :: Options + , teOptions :: TestOptions , teProcesses :: MVar [Process] , teGDB :: Maybe (MVar GDB) } @@ -39,22 +39,20 @@ data TestState = TestState , tsNodePacketLoss :: Map NodeName Scientific } -data Options = Options +data TestOptions = TestOptions { optDefaultTool :: String , optProcTools :: [(ProcName, String)] , optTestDir :: FilePath - , optVerbose :: Bool , optTimeout :: Scientific , optGDB :: Bool , optForce :: Bool } -defaultOptions :: Options -defaultOptions = Options +defaultTestOptions :: TestOptions +defaultTestOptions = TestOptions { optDefaultTool = "" , optProcTools = [] , optTestDir = ".test" - , optVerbose = False , optTimeout = 1 , optGDB = False , optForce = False -- cgit v1.2.3