diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2019-02-02 22:54:27 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2019-02-02 22:54:27 +0000 |
commit | ad5d8bced5aec1e887c44e7e3c26a9b74c5a3ba5 (patch) | |
tree | ae11500ffbfd90a91219e267f7dd34cd97f3e7be /app | |
parent | 4c20555200628f9f3b32ac4d08ea104dc9ef0560 (diff) | |
download | verismith-ad5d8bced5aec1e887c44e7e3c26a9b74c5a3ba5.tar.gz verismith-ad5d8bced5aec1e887c44e7e3c26a9b74c5a3ba5.zip |
Add timeout and timeout check
Diffstat (limited to 'app')
-rw-r--r-- | app/Main.hs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/Main.hs b/app/Main.hs index 1979112..0557996 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -53,9 +53,16 @@ runSimulation = do onFailure :: Text -> RunFailed -> Sh () onFailure t _ = do - echoP "Test FAIL" - cd ".." - cp_r (fromText t) $ fromText (t <> "_failed") + ex <- lastExitCode + case ex of + 124 -> do + echoP "Test TIMEOUT" + cd ".." + cp_r (fromText t) $ fromText (t <> "_timeout") + _ -> do + echoP "Test FAIL" + cd ".." + cp_r (fromText t) $ fromText (t <> "_failed") runEquivalence :: Gen ModDecl -> Text -> Int -> IO () runEquivalence gm t i = do |