aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2019-10-18 15:13:25 +0100
committerYann Herklotz <git@yannherklotz.com>2019-10-18 15:13:25 +0100
commit85a017f3d4c8cc3efb876e0864da8d6a033f88dc (patch)
tree566d66cefa0b4e5b2f0542d7e96d9e71a5fd3139
parent945c7435a41b93ff243b69f18a9c0216a7b70e24 (diff)
downloadverismith-85a017f3d4c8cc3efb876e0864da8d6a033f88dc.tar.gz
verismith-85a017f3d4c8cc3efb876e0864da8d6a033f88dc.zip
Change location of the html reports
-rw-r--r--src/Verismith/Fuzz.hs8
-rw-r--r--src/Verismith/Report.hs2
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