aboutsummaryrefslogtreecommitdiffstats
path: root/test/plugin_dialyzer.mk
diff options
context:
space:
mode:
Diffstat (limited to 'test/plugin_dialyzer.mk')
-rw-r--r--test/plugin_dialyzer.mk30
1 files changed, 29 insertions, 1 deletions
diff --git a/test/plugin_dialyzer.mk b/test/plugin_dialyzer.mk
index af7a5f4..9a13bcd 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 beam 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 plt-ebin-only
DIALYZER_TARGETS = $(addprefix dialyzer-,$(DIALYZER_CASES))
ifneq ($(shell which sem 2>/dev/null),)
@@ -263,3 +263,31 @@ dialyzer-plt-apps: build clean
$i "Confirm that runtime_tools was included in the PLT"
$t dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q runtime_tools
+
+dialyzer-plt-ebin-only: 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 Cowlib to the list of dependencies"
+ $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = cowlib\ndep_cowlib_commit = master\n"}' $(APP)/Makefile
+
+ $i "Build the application"
+ $t $(MAKE) -C $(APP) $v
+
+ $i "Run Cowlib tests to fetch autopatched dependencies"
+ $t $(MAKE) -C $(APP)/deps/cowlib tests $v
+
+ $i "Run Dialyzer"
+ $t $(DIALYZER_MUTEX) $(MAKE) -C $(APP) dialyze $v
+
+ $i "Check that the PLT file was created"
+ $t test -f $(APP)/.$(APP).plt
+
+ $i "Confirm that Cowlib was included in the PLT"
+ $t dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q cowlib
+
+ $i "Confirm that rebar files were not included in the PLT"
+ $t ! dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q rebar