aboutsummaryrefslogtreecommitdiffstats
path: root/src/Verismith/Fuzz.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Verismith/Fuzz.hs')
-rw-r--r--src/Verismith/Fuzz.hs8
1 files changed, 5 insertions, 3 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