diff options
-rw-r--r-- | plugins/xref.mk | 4 | ||||
-rw-r--r-- | test/plugin_dialyzer.mk | 27 |
2 files changed, 28 insertions, 3 deletions
diff --git a/plugins/xref.mk b/plugins/xref.mk index ab3619b..2e1676e 100644 --- a/plugins/xref.mk +++ b/plugins/xref.mk @@ -6,9 +6,9 @@ # Configuration. ifeq ($(XREF_CONFIG),) - XREF_ARGS := + XREFR_ARGS := else - XREF_ARGS := -c $(XREF_CONFIG) + XREFR_ARGS := -c $(XREF_CONFIG) endif XREFR ?= $(CURDIR)/xrefr diff --git a/test/plugin_dialyzer.mk b/test/plugin_dialyzer.mk index 2f6f9db..af7a5f4 100644 --- a/test/plugin_dialyzer.mk +++ b/test/plugin_dialyzer.mk @@ -1,6 +1,6 @@ # Dialyzer plugin. -DIALYZER_CASES = app apps-only apps-with-local-deps check custom-plt deps erlc-opts local-deps opts plt-apps +DIALYZER_CASES = app apps-only apps-with-local-deps beam check custom-plt deps erlc-opts local-deps opts plt-apps DIALYZER_TARGETS = $(addprefix dialyzer-,$(DIALYZER_CASES)) ifneq ($(shell which sem 2>/dev/null),) @@ -96,6 +96,31 @@ dialyzer-apps-with-local-deps: build clean $i "Confirm that my_core_app was NOT included in the PLT" $t ! dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q my_core_app +dialyzer-beam: build clean + + $i "Bootstrap a new OTP application named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap $v + + $i "Add lager to the list of dependencies" + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = lager\n"}' $(APP)/Makefile + + $i "Add lager_transform to ERLC_OPTS" + $t echo "ERLC_OPTS += +'{parse_transform, lager_transform}'" >> $(APP)/Makefile + + $i "Make Dialyzer use the beam files" + $t echo "DIALYZER_DIRS = -r ebin" >> $(APP)/Makefile + + $i "Create a module that calls lager" + $t printf "%s\n" \ + "-module(use_lager)." \ + "-export([doit/0])." \ + "doit() -> lager:error(\"Some message\")." > $(APP)/src/use_lager.erl + + $i "Run Dialyzer" + $t $(DIALYZER_MUTEX) $(MAKE) -C $(APP) dialyze $v + dialyzer-check: build clean $i "Bootstrap a new OTP application named $(APP)" |