diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2019-02-02 22:13:57 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2019-02-02 22:13:57 +0000 |
commit | 94082601ca31c079065c494cc24020471e0d3e31 (patch) | |
tree | 2333eb05bb616827e3f7792a94e71dba0296d119 /app/Main.hs | |
parent | 686bc953c50cf23b96dba4f182e8005289e71b98 (diff) | |
download | verismith-94082601ca31c079065c494cc24020471e0d3e31.tar.gz verismith-94082601ca31c079065c494cc24020471e0d3e31.zip |
Try to add logging
Diffstat (limited to 'app/Main.hs')
-rw-r--r-- | app/Main.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/Main.hs b/app/Main.hs index 107eef5..fa4f4f4 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -53,7 +53,7 @@ runSimulation = do onFailure :: Text -> RunFailed -> Sh () onFailure t _ = do - echoP "FAIL" + echoP "Test FAIL" cd ".." cp_r (fromText t) $ fromText (t <> "_failed") @@ -61,14 +61,13 @@ runEquivalence :: Gen ModDecl -> Text -> Int -> IO () runEquivalence gm t i = do m <- QC.generate gm shellyFailDir $ do - mkdir_p (fromText "equiv" </> fromText n) + mkdir_p (fromText "output" </> fromText n) curr <- toTextIgnore <$> pwd setenv "VERIFUZZ_ROOT" curr - cd (fromText "equiv" </> fromText n) + cd (fromText "output" </> fromText n) catch_sh (runEquiv defaultYosys defaultYosys - (Just defaultXst) m >> echoP "OK") $ + (Just defaultXst) m >> echoP "Test OK") $ onFailure n - cd ".." when (i < 5) (runEquivalence gm t $ i+1) where n = t <> "_" <> T.pack (show i) @@ -78,5 +77,5 @@ main :: IO () main = do num <- getNumCapabilities vars <- sequence $ (\x -> myForkIO $ - runEquivalence (randomMod 5 50) ("test_" <> T.pack (show x)) 0) <$> [1..num] + runEquivalence (randomMod 5 15) ("test_" <> T.pack (show x)) 0) <$> [1..num] sequence_ $ takeMVar <$> vars |