Commit 96eccc1f authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix Haskell coverage results



There are two current issues with the coverage values:

- we don't import all modules, thus leading to incomplete
  coverage results (too optimistic);
- we use hpc in its default mode (intersection), which means that even
  modules which do have coverage results but are not used in all
  binaries we test will be dropped from the results; thanks to Agata,
  passing --union to hpc is enough to have better results (don't
  remember why this wasn't there in the first place…)

After adding more modules to the import list and fixing the combining
mode, we now have a complete list of modules in coverage results, many
with zero coverage, so our overall coverage has dropped to about 60%.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 2db53645
...@@ -1493,7 +1493,8 @@ hs-coverage: $(haskell_tests) htools/hpc-htools ...@@ -1493,7 +1493,8 @@ hs-coverage: $(haskell_tests) htools/hpc-htools
rm -f *.tix rm -f *.tix
$(MAKE) hs-check $(MAKE) hs-check
@mkdir_p@ $(COVERAGE_HS_DIR) @mkdir_p@ $(COVERAGE_HS_DIR)
hpc combine $(HPCEXCL) test.tix hpc-htools.tix > coverage-htools.tix hpc combine --union $(HPCEXCL) \
test.tix hpc-htools.tix > coverage-htools.tix
hpc markup --destdir=$(COVERAGE_HS_DIR) coverage-htools.tix hpc markup --destdir=$(COVERAGE_HS_DIR) coverage-htools.tix
hpc report coverage-htools.tix hpc report coverage-htools.tix
$(LN_S) -f hpc_index.html $(COVERAGE_HS_DIR)/index.html $(LN_S) -f hpc_index.html $(COVERAGE_HS_DIR)/index.html
......
...@@ -61,21 +61,29 @@ import qualified Text.JSON as J ...@@ -61,21 +61,29 @@ import qualified Text.JSON as J
import qualified Data.Map import qualified Data.Map
import qualified Data.IntMap as IntMap import qualified Data.IntMap as IntMap
import qualified Ganeti.OpCodes as OpCodes import qualified Ganeti.Confd as Confd
import qualified Ganeti.Config as Config
import qualified Ganeti.Daemon as Daemon
import qualified Ganeti.Hash as Hash
import qualified Ganeti.Jobs as Jobs import qualified Ganeti.Jobs as Jobs
import qualified Ganeti.Logging as Logging
import qualified Ganeti.Luxi as Luxi import qualified Ganeti.Luxi as Luxi
import qualified Ganeti.Objects as Objects
import qualified Ganeti.OpCodes as OpCodes
import qualified Ganeti.Query2 as Query2
import qualified Ganeti.Runtime as Runtime
import qualified Ganeti.Ssconf as Ssconf import qualified Ganeti.Ssconf as Ssconf
import qualified Ganeti.HTools.CLI as CLI import qualified Ganeti.HTools.CLI as CLI
import qualified Ganeti.HTools.Cluster as Cluster import qualified Ganeti.HTools.Cluster as Cluster
import qualified Ganeti.HTools.Container as Container import qualified Ganeti.HTools.Container as Container
import qualified Ganeti.HTools.ExtLoader import qualified Ganeti.HTools.ExtLoader
import qualified Ganeti.HTools.Group as Group
import qualified Ganeti.HTools.IAlloc as IAlloc import qualified Ganeti.HTools.IAlloc as IAlloc
import qualified Ganeti.HTools.Instance as Instance import qualified Ganeti.HTools.Instance as Instance
import qualified Ganeti.HTools.JSON as JSON import qualified Ganeti.HTools.JSON as JSON
import qualified Ganeti.HTools.Loader as Loader import qualified Ganeti.HTools.Loader as Loader
import qualified Ganeti.HTools.Luxi as HTools.Luxi import qualified Ganeti.HTools.Luxi as HTools.Luxi
import qualified Ganeti.HTools.Node as Node import qualified Ganeti.HTools.Node as Node
import qualified Ganeti.HTools.Group as Group
import qualified Ganeti.HTools.PeerMap as PeerMap import qualified Ganeti.HTools.PeerMap as PeerMap
import qualified Ganeti.HTools.Rapi import qualified Ganeti.HTools.Rapi
import qualified Ganeti.HTools.Simu as Simu import qualified Ganeti.HTools.Simu as Simu
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment