|
@@ -9,6 +9,7 @@ ifeq ($(filter proper,$(DEPS) $(TEST_DEPS)),proper)
|
|
tests:: proper
|
|
tests:: proper
|
|
|
|
|
|
define proper_check.erl
|
|
define proper_check.erl
|
|
|
|
+ $(call cover.erl)
|
|
code:add_pathsa([
|
|
code:add_pathsa([
|
|
"$(call core_native_path,$(CURDIR)/ebin)",
|
|
"$(call core_native_path,$(CURDIR)/ebin)",
|
|
"$(call core_native_path,$(DEPS_DIR)/*/ebin)",
|
|
"$(call core_native_path,$(DEPS_DIR)/*/ebin)",
|
|
@@ -24,13 +25,16 @@ define proper_check.erl
|
|
end
|
|
end
|
|
|| {F, 0} <- M:module_info(exports)])
|
|
|| {F, 0} <- M:module_info(exports)])
|
|
end,
|
|
end,
|
|
- try
|
|
|
|
- case $(1) of
|
|
|
|
|
|
+ try begin
|
|
|
|
+ CoverSetup(),
|
|
|
|
+ Res = case $(1) of
|
|
all -> [true] =:= lists:usort([Module(M) || M <- [$(call comma_list,$(3))]]);
|
|
all -> [true] =:= lists:usort([Module(M) || M <- [$(call comma_list,$(3))]]);
|
|
module -> Module($(2));
|
|
module -> Module($(2));
|
|
function -> proper:quickcheck($(2), nocolors)
|
|
function -> proper:quickcheck($(2), nocolors)
|
|
- end
|
|
|
|
- of
|
|
|
|
|
|
+ end,
|
|
|
|
+ CoverExport("$(COVER_DATA_DIR)/proper.coverdata"),
|
|
|
|
+ Res
|
|
|
|
+ end of
|
|
true -> halt(0);
|
|
true -> halt(0);
|
|
_ -> halt(1)
|
|
_ -> halt(1)
|
|
catch error:undef ->
|
|
catch error:undef ->
|
|
@@ -41,15 +45,15 @@ endef
|
|
|
|
|
|
ifdef t
|
|
ifdef t
|
|
ifeq (,$(findstring :,$(t)))
|
|
ifeq (,$(findstring :,$(t)))
|
|
-proper: test-build
|
|
|
|
|
|
+proper: test-build cover-data-dir
|
|
$(verbose) $(call erlang,$(call proper_check.erl,module,$(t)))
|
|
$(verbose) $(call erlang,$(call proper_check.erl,module,$(t)))
|
|
else
|
|
else
|
|
-proper: test-build
|
|
|
|
|
|
+proper: test-build cover-data-dir
|
|
$(verbose) echo Testing $(t)/0
|
|
$(verbose) echo Testing $(t)/0
|
|
$(verbose) $(call erlang,$(call proper_check.erl,function,$(t)()))
|
|
$(verbose) $(call erlang,$(call proper_check.erl,function,$(t)()))
|
|
endif
|
|
endif
|
|
else
|
|
else
|
|
-proper: test-build
|
|
|
|
|
|
+proper: test-build cover-data-dir
|
|
$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
|
|
$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
|
|
$(wildcard ebin/*.beam) $(call core_find,$(TEST_DIR)/,*.beam))))))
|
|
$(wildcard ebin/*.beam) $(call core_find,$(TEST_DIR)/,*.beam))))))
|
|
$(gen_verbose) $(call erlang,$(call proper_check.erl,all,undefined,$(MODULES)))
|
|
$(gen_verbose) $(call erlang,$(call proper_check.erl,all,undefined,$(MODULES)))
|