Testsuite/Coverage: initial commit for code coverage
This commit is contained in:
parent
ce54c5bc3d
commit
9834aa9d6c
4
.gitignore
vendored
4
.gitignore
vendored
@ -21,6 +21,7 @@
|
||||
/src/client/embedded/bootstrap/concrete_parser.mli
|
||||
|
||||
/test/.depend
|
||||
/test/reports
|
||||
|
||||
/test/test-store
|
||||
/test/test-state
|
||||
@ -39,8 +40,11 @@
|
||||
*.cmti
|
||||
*.cmxa
|
||||
*.cmxs
|
||||
*.cmp
|
||||
*.mli.deps
|
||||
*.ml.deps
|
||||
|
||||
bisect*.out
|
||||
|
||||
*.rej
|
||||
*.orig
|
14
src/Makefile
14
src/Makefile
@ -142,7 +142,8 @@ UTILS_PACKAGES := \
|
||||
lwt \
|
||||
ocplib-json-typed \
|
||||
sodium \
|
||||
zarith
|
||||
zarith \
|
||||
$(COVERAGEPKG) \
|
||||
|
||||
UTILS_OBJS := \
|
||||
${UTILS_LIB_IMPLS:.ml=.cmx} ${UTILS_LIB_IMPLS:.ml=.ml.deps} \
|
||||
@ -167,10 +168,10 @@ COMPILER_LIB_INTFS := \
|
||||
|
||||
COMPILER_LIB_IMPLS := \
|
||||
compiler/embedded_cmis.ml \
|
||||
compiler/tezos_compiler.ml
|
||||
compiler/tezos_compiler.ml \
|
||||
|
||||
COMPILER_IMPLS := \
|
||||
compiler_main.ml
|
||||
compiler_main.ml \
|
||||
|
||||
COMPILER_PACKAGES := \
|
||||
${UTILS_PACKAGES} \
|
||||
@ -179,7 +180,7 @@ COMPILER_PACKAGES := \
|
||||
lwt.unix \
|
||||
ocplib-endian \
|
||||
ocplib-ocamlres \
|
||||
unix
|
||||
unix \
|
||||
|
||||
COMPILER_OBJS := \
|
||||
${COMPILER_IMPLS:.ml=.cmx} ${COMPILER_IMPLS:.ml=.ml.deps} \
|
||||
@ -277,7 +278,8 @@ NODE_PACKAGES := \
|
||||
dynlink \
|
||||
git \
|
||||
irmin.unix \
|
||||
ocplib-resto.directory
|
||||
ocplib-resto.directory \
|
||||
|
||||
|
||||
EMBEDDED_NODE_PROTOCOLS := \
|
||||
$(patsubst proto/%/,proto/embedded_proto_%.cmxa, \
|
||||
@ -426,7 +428,7 @@ clean::
|
||||
|
||||
.PHONY: clean
|
||||
clean::
|
||||
-find \( -name \*.cm\* -or -name \*~ -or -name \*.o -or -name \*.a \) -delete
|
||||
-find \( -name \*.cm\* -or -name \*.cmp -or -name \*.out -or -name \*~ -or -name \*.o -or -name \*.a \) -delete
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
|
||||
ifeq ($(strip ${COVERAGE}),yes)
|
||||
COVERAGEPKG := bisect_ppx
|
||||
endif
|
||||
|
||||
INCLUDES = \
|
||||
$(patsubst %, -I %, $(SOURCE_DIRECTORIES)) \
|
||||
$(patsubst %, -package %, $(PACKAGES)) \
|
||||
|
@ -28,5 +28,6 @@ depends: [
|
||||
"ocplib-json-typed"
|
||||
"ocplib-resto" {>= "dev"}
|
||||
"sodium" {>= "0.3.0"}
|
||||
"kaputt"
|
||||
"kaputt" (* only for testing *)
|
||||
"bisect_ppx" (* only for testing *)
|
||||
]
|
||||
|
@ -42,7 +42,8 @@ PACKAGES := \
|
||||
ocplib-resto.directory \
|
||||
sodium \
|
||||
unix \
|
||||
kaputt
|
||||
kaputt \
|
||||
bisect_ppx.runtime
|
||||
|
||||
############################################################################
|
||||
## External packages
|
||||
@ -190,6 +191,28 @@ test-data-encoding: ${NODELIB} ${TEST_DATA_ENCODING_IMPLS:.ml=.cmx}
|
||||
clean::
|
||||
rm -f test-data-encoding
|
||||
|
||||
COVERAGESRCDIR= \
|
||||
-I ../src \
|
||||
-I ../src/client \
|
||||
-I ../src/client/embedded \
|
||||
-I ../src/client/embedded/bootstrap \
|
||||
-I ../src/client/embedded/bootstrap/mining \
|
||||
-I ../src/client/embedded/bootstrap/demo \
|
||||
-I ../src/compiler \
|
||||
-I ../src/node \
|
||||
-I ../src/node/db \
|
||||
-I ../src/node/updater \
|
||||
-I ../src/node/net \
|
||||
-I ../src/node/shell \
|
||||
-I ../src/proto \
|
||||
-I ../src/proto/bootstrap \
|
||||
-I ../src/proto/demo \
|
||||
-I ../src/utils
|
||||
|
||||
bisect:
|
||||
bisect-ppx-report $(COVERAGESRCDIR) \
|
||||
-ignore-missing-files -html reports bisect*.out
|
||||
|
||||
############################################################################
|
||||
## Generic rules
|
||||
|
||||
@ -205,7 +228,7 @@ test.cmx: test.cmi
|
||||
ocamlfind ocamlc ${OCAMLFLAGS} -c $<
|
||||
|
||||
clean::
|
||||
-rm -f *.cm* lib/*.cm*
|
||||
-rm -f *.cm* lib/*.cm* *.out *.o
|
||||
|
||||
-include .depend
|
||||
.depend: $(wildcard *.ml *.mli lib/*.ml lib/*.mli)
|
||||
|
Loading…
Reference in New Issue
Block a user