From 85a017f3d4c8cc3efb876e0864da8d6a033f88dc Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 18 Oct 2019 15:13:25 +0100 Subject: Change location of the html reports --- src/Verismith/Fuzz.hs | 8 +++++--- src/Verismith/Report.hs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Verismith/Fuzz.hs b/src/Verismith/Fuzz.hs index f26630a..a4b74b1 100644 --- a/src/Verismith/Fuzz.hs +++ b/src/Verismith/Fuzz.hs @@ -377,11 +377,9 @@ fuzz gen conf = do tsynth tequiv (getTime redResult) - liftSh . writefile "index.html" $ printResultReport (bname currdir) report return report where seed = conf ^. configProperty . propSeed - bname = T.pack . takeBaseName . T.unpack . toTextIgnore genMethod = case T.toLower $ conf ^. configProperty . propSampleMethod of "hat" -> do logT "Using the hat function" @@ -427,8 +425,12 @@ fuzzInDir fuzzInDir k fp src conf = do make fp res <- pop fp $ fuzz src conf - liftSh . when (passedFuzz res && not k) $ rm_rf fp + liftSh $ do + writefile (fp <.> "html") $ printResultReport (bname fp) res + when (passedFuzz res && not k) $ rm_rf fp relativeFuzzReport res + where + bname = T.pack . takeBaseName . T.unpack . toTextIgnore fuzzMultiple :: MonadFuzz m diff --git a/src/Verismith/Report.hs b/src/Verismith/Report.hs index f0608f2..196e891 100644 --- a/src/Verismith/Report.hs +++ b/src/Verismith/Report.hs @@ -316,7 +316,7 @@ fuzzStatus name (FuzzReport dir s1 s2 s3 sz t1 t2 t3) = H.tr $ do . ( H.a ! A.href ( H.textValue - $ toTextIgnore (dir fromText "index" <.> "html") + $ toTextIgnore (dir <.> "html") ) ) $ H.toHtml name -- cgit