For version 1.0:
wget http://www.algo-prog.info/zamcov/distribution/zamcov-1.0.tar.gz tar xzf zamcov-1.0.tar.gz cd zamcov-1.0 edit config.mk # if default options don't suit you wget http://caml.inria.fr/pub/distrib/ocaml-3.12/ocaml-3.12.0.tar.gz make # sudo make install # this depends on where you install zamcov
Three binaries are generated:
zamcov-compile
is a modified version of ocamlc compiler, which is able to generate additional information on the link between the binary and the source code.zamcov-cover
is a coverage report generator.zamcov-run
is an implementation of the OCaml Virtual Machine which is able to generate execution traces for report generation.
Here is an example with test.ml
:
./zamcov-compile test.ml -o test.exe ./zamcov-run -mcdc test.mcdc -trace test.trace test.exe ./zamcov-cover -mcdc test.mcdc -trace test.trace test.exe open ./coverage_report/index.html
ZAMCOV has been developed using Mac OS X (lately, OS X Lion) and Gnu/Linux. It should work on most platforms which support a “normal OCaml” distribution.