diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Main.hs | 3 | ||||
-rw-r--r-- | src/Run.hs | 5 | ||||
-rw-r--r-- | src/Run/Monad.hs | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs index 4e6176f..20b3da2 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -64,6 +64,9 @@ options = , Option ['V'] ["version"] (NoArg $ \opts -> opts { optShowVersion = True }) "show version and exit" + , Option [] ["wait"] + (NoArg $ to $ \opts -> opts { optWait = True }) + "wait at the end of each test" ] where to f opts = opts { optTest = f (optTest opts) } @@ -83,7 +83,10 @@ runTest out opts test = do oldHandler <- installHandler processStatusChanged (CatchInfo sigHandler) Nothing res <- runExceptT $ flip runReaderT (tenv, tstate) $ fromTestRun $ do - withInternet $ \_ -> evalSteps (testSteps test) + withInternet $ \_ -> do + evalSteps (testSteps test) + when (optWait opts) $ do + void $ outPromptGetLine $ "Test '" <> testName test <> "' completed, waiting..." void $ installHandler processStatusChanged oldHandler Nothing diff --git a/src/Run/Monad.hs b/src/Run/Monad.hs index 037f585..9ec9065 100644 --- a/src/Run/Monad.hs +++ b/src/Run/Monad.hs @@ -54,6 +54,7 @@ data TestOptions = TestOptions , optGDB :: Bool , optForce :: Bool , optKeep :: Bool + , optWait :: Bool } defaultTestOptions :: TestOptions @@ -65,6 +66,7 @@ defaultTestOptions = TestOptions , optGDB = False , optForce = False , optKeep = False + , optWait = False } data Failed = Failed |